Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/Tendis-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
cpplint-check:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
test-unittest-sh:
needs: [cpplint-check]
name: Test-unittest.sh
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -116,7 +116,7 @@ jobs:
test-redistest-sh:
needs: [cpplint-check]
name: Test-redistest.sh
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -141,7 +141,7 @@ jobs:
test-restore_test:
needs: [cpplint-check]
name: Test-restore_test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -156,7 +156,7 @@ jobs:
test-repl_test:
needs: [cpplint-check]
name: Test-repl_test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -171,7 +171,7 @@ jobs:
test-cluster_test-part1:
needs: [cpplint-check]
name: Test-cluster_test-part1
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -186,7 +186,7 @@ jobs:
test-cluster_test-part2:
needs: [cpplint-check]
name: Test-cluster_test-part2
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -201,7 +201,7 @@ jobs:
test-gotest-normaltest-part1:
needs: [cpplint-check]
name: Test-gotest-normaltest-part1
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -218,7 +218,7 @@ jobs:
test-gotest-normaltest-part2:
needs: [cpplint-check]
name: Test-gotest-normaltest-part2
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -235,7 +235,7 @@ jobs:
test-gotest-normaltest-part3:
needs: [cpplint-check]
name: Test-gotest-normaltest-part3
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TEST_DIR: build/bin
steps:
Expand All @@ -252,7 +252,7 @@ jobs:
test-gotest-versiontest:
needs: [cpplint-check]
name: Test-gotest-versiontest
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ github.token }}
TEST_DIR: build/bin
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
git am -s ../../patch/0001-add-statistic-for-sst-file-info.patch\;
git am -s ../../patch/0002-add-latency-statistic-log.patch\;
git am -s ../../patch/0003-better-control-of-blobldb-space-amp.patch\;
git am -s ../../patch/0004-reclaim-blob-files-after-deleting-all-ssts.patch\;
")
execute_process(COMMAND bash "-c" ${patchCommand})
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From a7137cb8b9bdc53abd14943d467f1410078c9abd Mon Sep 17 00:00:00 2001
From: takenliu <takenliu@tencent.com>
Date: Thu, 28 May 2026 15:36:00 +0800
Subject: [PATCH] Fix blob files not reclaimed after deleting all SSTs add
tendis_extension.cc in src.mk

---
db/version_builder.cc | 6 ++++++
src.mk | 1 +
2 files changed, 7 insertions(+)

diff --git a/db/version_builder.cc b/db/version_builder.cc
index 210b0de86..9a72307d3 100644
--- a/db/version_builder.cc
+++ b/db/version_builder.cc
@@ -1073,6 +1073,12 @@ class VersionBuilder::Rep {
const uint64_t oldest_blob_file_with_linked_ssts =
GetMinOldestBlobFileNumber();

+ // If there are no blob files with linked SSTs, meaning that there are no
+ // valid blob files
+ if (oldest_blob_file_with_linked_ssts == kInvalidBlobFileNumber) {
+ return;
+ }
+
auto process_base =
[vstorage](const std::shared_ptr<BlobFileMetaData>& base_meta) {
assert(base_meta);
diff --git a/src.mk b/src.mk
index 7d2663b99..5b9890a49 100644
--- a/src.mk
+++ b/src.mk
@@ -1,5 +1,6 @@
# These are the sources from which librocksdb.a is built:
LIB_SOURCES = \
+ env/tendis_extension.cc \
cache/cache.cc \
cache/cache_entry_roles.cc \
cache/cache_key.cc \
--
2.41.3

Loading