tokyo cabinet: .tcb.wal file created along with .tcb file. Db size doesnot decreases while deleting records

StackOverflow https://stackoverflow.com/questions/20169691

  •  04-08-2022
  •  | 
  •  

Question

I am using tokyo cabinets B+ tree API to create a lookup database. On linux environment I see a .tcb.wal file created along with the actual .tcb database file. The size of this file is 0. I wonder whether its a lock file that is created to help synchronization. Also when I delete records from the database the size of the file does not decrease. Any reasons why its behaving like that?

Was it helpful?

Solution

The extension .wal stands for Write Ahead Logging file. This file is only relevant if you use any transaction functions; most applications do not use these. (For details, search for "ahead" in the documentation.)

The file size does not change for every deletion for efficiency reasons. Similarly, if you create an empty database, it will reserve space for faster insertions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top