Skip to content

Commit cab3aef

Browse files
committed
Remove unused function
1 parent 5ad137c commit cab3aef

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

src/aggregate/aggregate_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ static int execCommandCommon(RedisModuleCtx *ctx, RedisModuleString **argv, int
906906
if (RunInThread()) {
907907
// Prepare context for the worker thread
908908
// Since we are still in the main thread, and we already validated the
909-
// spec'c existence, it is safe to directly get the strong reference from the spec
909+
// spec's existence, it is safe to directly get the strong reference from the spec
910910
// found in buildRequest.
911911
StrongRef spec_ref = IndexSpec_GetStrongRefUnsafe(r->sctx->spec);
912912
RedisModuleBlockedClient *blockedClient = RedisModule_BlockClient(ctx, NULL, NULL, NULL, 0);

src/redisearch_api.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -899,28 +899,6 @@ size_t RediSearch_MemUsage(RSIndex* rm) {
899899
return res;
900900
}
901901

902-
// Calculate the memory usage of all the indexes currently existing
903-
size_t RediSearch_TotalMemUsage(void) {
904-
size_t total = 0;
905-
// Traverse `specDict_g`, and sum the memory usage of each index
906-
dictIterator *iter = dictGetIterator(specDict_g);
907-
dictEntry *entry;
908-
while ((entry = dictNext(iter))) {
909-
StrongRef ref = dictGetRef(entry);
910-
IndexSpec *sp = (IndexSpec *)StrongRef_Get(ref);
911-
if (!sp) {
912-
continue;
913-
}
914-
// Lock for read
915-
pthread_rwlock_rdlock(&sp->rwlock);
916-
// Collect memory usage of the index
917-
total += RediSearch_MemUsage((RSIndex *)ref.rm);
918-
pthread_rwlock_unlock(&sp->rwlock);
919-
}
920-
dictReleaseIterator(iter);
921-
return total;
922-
}
923-
924902
// Collect mem-usage, indexing time and gc statistics of all the currently
925903
// existing indexes
926904
TotalSpecsInfo RediSearch_TotalInfo(void) {

0 commit comments

Comments
 (0)