MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zdiff

Function zdiff

app/redis-6.2.6/src/t_zset.c:2540–2552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2538}
2539
2540static void zdiff(zsetopsrc *src, long setnum, zset *dstzset, size_t *maxelelen, size_t *totelelen) {
2541 /* Skip everything if the smallest input is empty. */
2542 if (zuiLength(&src[0]) > 0) {
2543 int diff_algo = zsetChooseDiffAlgorithm(src, setnum);
2544 if (diff_algo == 1) {
2545 zdiffAlgorithm1(src, setnum, dstzset, maxelelen, totelelen);
2546 } else if (diff_algo == 2) {
2547 zdiffAlgorithm2(src, setnum, dstzset, maxelelen, totelelen);
2548 } else if (diff_algo != 0) {
2549 serverPanic("Unknown algorithm");
2550 }
2551 }
2552}
2553
2554uint64_t dictSdsHash(const void *key);
2555int dictSdsKeyCompare(void *privdata, const void *key1, const void *key2);

Callers 1

Calls 4

zuiLengthFunction · 0.85
zsetChooseDiffAlgorithmFunction · 0.85
zdiffAlgorithm1Function · 0.85
zdiffAlgorithm2Function · 0.85

Tested by

no test coverage detected