Skip to content

Commit

Permalink
Fix to bug in setSingle (#186)
Browse files Browse the repository at this point in the history
* `readInternalMeta` should use the raw meta (from `doc`).
  • Loading branch information
greensky00 authored Nov 6, 2024
1 parent 8ead842 commit 447e138
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/libjungle/sized_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

#pragma once

#include <cstdint>
#include <iostream>
#include <sstream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/generic_bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.

#pragma once

#include <cstdlib>
#include <mutex>
#include <thread>

Expand Down
2 changes: 1 addition & 1 deletion src/table_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ Status TableFile::setSingle(uint32_t key_hash_val,
// Immediate purging option,
// only for the bottom-most non-zero level.
InternalMeta i_meta_from_rec;
readInternalMeta(rec.meta, i_meta_from_rec);
readInternalMeta(SizedBuf(doc.metalen, doc.meta), i_meta_from_rec);
if (i_meta_from_rec.isTombstone || force_delete) {
fs = fdb_del(kvs_db, &doc);
deletion_executed = true;
Expand Down

0 comments on commit 447e138

Please sign in to comment.