reverbrain / eblob

Eblob is an append-only low-level IO library, which saves data in blob files. Created as low-level backend for elliptics
GNU Lesser General Public License v3.0
104 stars 29 forks source link

Fixes #94

Closed shaitan closed 9 years ago

shaitan commented 9 years ago

Logs blob config and disk control flags in pretty format. Added to eblob_backend counter defrag_generation that is increased after each time when blobs are defraged. It is used by code that could have TOC vs TOU race between cache lookup and writing a record.

Added string representation of want_defrag status of base to json statistics. Fixed base size (bctl_size) in eblob_check_record - bctl->data_size is a valid size of closed blob, bctl->data_offset is an offset of open blob where new record should be written. In common way it is better to use the larger one.

Fixed defrag: restored sorting unsorted blobs even if defrag is not needed.

Sets errno if init has been failed - it is the one possible way to notify caller about which error is occurred.