leveldb/table: Writer: keys are not in increasing order X, Y
Author: karalabeCreated Jan 15, 2018Updated Mar 4, 2023
One of our users reported a system crash (unrelated to leveldb, some memory management error) and on startup they failed to open the leveldb database again (https://github.com/ethereum/go-ethereum/issues/15879) with the following error:
leveldb/table: Writer: keys are not in increasing order: "LastFast\x01\xa7ݞ\x05\x00\x00\x00", "LastFast\x01\xa1۞\x05\x00\x00\x00"Seems to me that some compaction round got interrupted halfway through. The reason I'm opening this ticket because I'd expect this to be journalled and being impossible to achieve (i.e. until compaction is done, the file being generated shouldn't be marked as done/usable).
Unsure if this report helps you in any way (feel free to close if not), just figured it's a curiosity that may be useful to submit upstream.
Source: syndtr/goleveldb