Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cherry-pick code to pika 3.5 release branch #2515

Closed
wants to merge 31 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b32d1dd
fix: Fix the problem of possible slave_key conflict (#2431)
happy-v587 Feb 29, 2024
8218af4
feat: pika supports kubeblocks component definition api (#2411)
Y-Rookie Feb 29, 2024
1c115be
feat: support dynamic set max-conn-rbuf-size (#2434)
happy-v587 Mar 2, 2024
24a7957
fix ci replication go test failed problem (#2435)
Mixficsol Mar 2, 2024
85ef806
fix not syncing (#2430)
baixin01 Mar 3, 2024
686ed25
Fix the initial authentication status of the ACL user and the ACL per…
lqxhub Mar 5, 2024
eb07f71
fix: return kErr status when Master handle MetaRsync reqeust if db is…
chengyu-l Mar 6, 2024
d473e96
fix: after full synchronization fails, full synchronization will be s…
chengyu-l Mar 6, 2024
fd136b8
fix: linux arm64 spelling mistake in Makefile of pika_exporter(#2456)…
chengyu-l Mar 6, 2024
0feab46
fix: master has db data, but no binlog. a new slave has replication_i…
chengyu-l Mar 6, 2024
da8f01f
add tcl go test (#2464)
Mixficsol Mar 7, 2024
ef239c2
fix: acl forward compatible (#2459)
dingxiaoshuai123 Mar 8, 2024
a688556
Integration tests differentiate between cached and non-cached (#2467)
luky116 Mar 8, 2024
9349342
feat:add issue translation robot (#2478)
lqxhub Mar 9, 2024
21275ce
fix: support removing pika instance from codis dashboard before pod s…
chengyu-l Mar 9, 2024
77e1ac5
fix: support saving pika config to hostpath (#2476)
chengyu-l Mar 9, 2024
95fd36e
fix: no namespace in configmap, so remove the namespace (#2474)
chengyu-l Mar 9, 2024
44dcbe3
fix: move Dockerfile and build_docker.sh into docker subdirectory (#2…
chengyu-l Mar 9, 2024
b99674a
feat: support building pika_exporter docker image (#2451)
chengyu-l Mar 11, 2024
a90c19f
add rename-command go test (#2468)
Mixficsol Mar 11, 2024
bc24ccf
ci: cleanup code (#2479)
baerwang Mar 11, 2024
a20af1f
feat: support deploying pika_exporter components using kubeblocks (#2…
chengyu-l Mar 11, 2024
ccd9be1
fix: fix github action CI failure (#2491)
luky116 Mar 12, 2024
6689fcd
test: add replication-test-go (#2496)
Mixficsol Mar 12, 2024
fea40b4
feat: add tcl test (#2497)
Mixficsol Mar 12, 2024
3c9e362
test: add acl and userBlackList test (#2495)
luky116 Mar 12, 2024
648ad94
fix:dbsize caculate error (#2494)
chejinge Mar 13, 2024
2ab9239
fix:Binlog is written repeatedly && not delete cache (#2485)
chejinge Mar 13, 2024
2c93430
feat:add multi key slot migrate (#2486)
chejinge Mar 13, 2024
08b394c
feat:add namespace for kubeblocks pika cluster helm chart (#2480)
Y-Rookie Mar 13, 2024
e89c8ef
test: add codis integration test (#2502)
luky116 Mar 14, 2024
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
Prev Previous commit
Next Next commit
fix:Binlog is written repeatedly && not delete cache (#2485)
* fix:Binlog is written repeatedly during the data migration process && not delete cache
---------

Co-authored-by: chejinge <chejinge@360.cn>
  • Loading branch information
2 people authored and liuyuecai committed Mar 14, 2024
commit 2ab9239898c857ed6c6640368585ce0d989512b5
11 changes: 8 additions & 3 deletions src/pika_slot_command.cc
Original file line number Diff line number Diff line change
@@ -852,14 +852,14 @@ std::string GetSlotsTagKey(uint32_t crc) {
return SlotTagPrefix + std::to_string(crc);
}

// delete key from db
// delete key from db && cache
int DeleteKey(const std::string& key, const char key_type, const std::shared_ptr<DB>& db) {
LOG(INFO) << "Del key Srem key " << key;
int32_t res = 0;
std::string slotKey = GetSlotKey(GetSlotID(key));
LOG(INFO) << "Del key Srem key " << key;

// delete key from slot
// delete slotkey
std::vector<std::string> members;
members.emplace_back(key_type + key);
rocksdb::Status s = db->storage()->SRem(slotKey, members, &res);
@@ -873,6 +873,12 @@ int DeleteKey(const std::string& key, const char key_type, const std::shared_ptr
}
}

// delete from cache
if (PIKA_CACHE_NONE != g_pika_conf->cache_model()
&& PIKA_CACHE_STATUS_OK == db->cache()->CacheStatus()) {
db->cache()->Del(members);
}

// delete key from db
members.clear();
members.emplace_back(key);
@@ -882,7 +888,6 @@ int DeleteKey(const std::string& key, const char key_type, const std::shared_ptr
LOG(WARNING) << "Del key: " << key << " at slot " << GetSlotID(key) << " error";
return -1;
}
WriteDelKeyToBinlog(key, db);

return 1;
}