apohllo / rod

Ruby Object Database
http://github.com/apohllo/rod
15 stars 4 forks source link

fix destroy of hash index #217

Closed apohllo closed 12 years ago

apohllo commented 12 years ago

Current implementation uses truncate option to remove its contents. But this causes problems, if the new index has different Berkeley DB flags. So the new implementation should just remove the index file.

apohllo commented 12 years ago

Upps, we have to make HashIndex#save idempotent, since an index that is not accessed causes problems when closing DB.