Files
ternfs-XTXMarkets/cpp/rocksdb-stdint.diff
Francesco Mazzoli 01f9d5addf Improve FUSE, run all tests with it
The FUSE driver, up to now, had no way to know when the user had
"explicitly" closed a file. Instead it linked the TernFS file on
flush, which could cause nasty situation. The classic example
is a fork causing the FD to a TernFS file being present in the forked
process, and then the process dying causing a spurious flush.

This commit adds a way to detect when a flush is due to a close(),
which allows us to link the file only in the cases where that happened,
which is a much better heuristic and close to what we do in the kernel
module.

This commit also contains various other improvements to make all tests
pass under FUSE. The big remaining item is changing how files are read
(they're currently read all upfront and then kept in memory).
2025-09-18 18:09:43 +01:00

38 lines
1.2 KiB
Diff

diff --git a/table/block_based/data_block_hash_index.h b/table/block_based/data_block_hash_index.h
index f356395f3..6eaf71735 100644
--- a/table/block_based/data_block_hash_index.h
+++ b/table/block_based/data_block_hash_index.h
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include <cstdint>
#include "rocksdb/slice.h"
diff --git a/trace_replay/trace_replay.cc b/trace_replay/trace_replay.cc
index 37b95852b..c681e374c 100644
--- a/trace_replay/trace_replay.cc
+++ b/trace_replay/trace_replay.cc
@@ -317,7 +317,7 @@ Status TracerHelper::DecodeTraceRecord(Trace* trace, int trace_file_version,
cf_ids.reserve(multiget_size);
multiget_keys.reserve(multiget_size);
for (uint32_t i = 0; i < multiget_size; i++) {
- uint32_t tmp_cfid;
+ uint32_t tmp_cfid = 0;
Slice tmp_key;
GetFixed32(&cfids_payload, &tmp_cfid);
GetLengthPrefixedSlice(&keys_payload, &tmp_key);
diff --git a/util/string_util.h b/util/string_util.h
index 55d106fff..2adf1ec68 100644
--- a/util/string_util.h
+++ b/util/string_util.h
@@ -10,6 +10,7 @@
#include <string>
#include <unordered_map>
#include <vector>
+#include <cstdint>
#include "rocksdb/rocksdb_namespace.h"