0

I created a mvccTable in DolphinDB and saved it to disk.But when I tried to delete the table folder and table files,it failed because the log.bin is "open" and in use by dolphindb.exe. How can I delete the table folder without shutting douwn the dolphindb server? My DolphinDB version is windows64 v0.95.3.

def dropMvccTable(WORK_DIR,tableName){
    if(exists(WORK_DIR+"/"+tableName)){
        try{
        rmdir(WORK_DIR+"/"+tableName,true)
        rm(WORK_DIR+"/"+tableName+".tbl")
        rm(WORK_DIR+"/"+tableName+".sym")
        }catch(ex){}
        }
    }
WORK_DIR="H:/DolphinDB/Data"
d=1..10000000
str=take(`ABC`JDK`KILL`PEN,10000000)
price=1.23+0..9999999
temp=table(id,str,price)
tt=mvccTable(1:0,`id`str`price,[INT,SYMBOL,DOUBLE],WORK_DIR,"tt")
tt.append!(temp)

dropMvccTable(WORK_DIR,"tt")
Summer.H
  • 99
  • 1
  • 7

1 Answers1

0

Please release the mvcc table before dropping.

tt = NULL

The release of the table will close the logging file associated with the mvcc table.

Davis Zhou
  • 353
  • 4
  • 6