Dhruba Borthakur afed60938f Fox db_stress crash by copying keys before changing sequencenum to zero.
Summary:
The compaction process zeros out sequence numbers if the output is
part of the bottommost level.
The Slice is supposed to refer to an immutable data buffer. The
merger that implements the priority queue while reading kvs as
the input of a compaction run reies on this fact. The bug was that
were updating the sequence number of a record in-place and that was
causing suceeding invocations of the merger to return kvs in
arbitrary order of sequence numbers.
The fix is to copy the key to a local memory buffer before setting
its seqno to 0.

Test Plan:
Set Options.purge_redundant_kvs_while_flush = false and then run
db_stress --ops_per_thread=1000 --max_key=320

Reviewers: emayanke, sheki

Reviewed By: emayanke

CC: leveldb

Differential Revision: https://reviews.facebook.net/D9147
2013-03-06 10:52:08 -08:00
..
2013-02-28 18:04:58 -08:00
2013-03-04 07:41:15 -08:00
2012-11-28 17:18:41 -08:00
2012-11-07 14:19:48 -08:00
2013-03-04 07:41:15 -08:00
2011-10-31 17:22:06 +00:00
2011-10-31 17:22:06 +00:00
2012-09-16 19:33:43 -07:00
2013-03-04 07:41:15 -08:00
2012-12-16 08:58:28 -08:00
2012-12-17 11:26:59 -08:00
2012-12-17 11:26:59 -08:00
2011-10-31 17:22:06 +00:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00
2013-02-28 18:04:58 -08:00