Skip to content

Commit

Permalink
fixed code review
Browse files Browse the repository at this point in the history
  • Loading branch information
MeirShpilraien committed Oct 16, 2018
1 parent 2480f65 commit f256e77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/dist_aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,13 @@ void AggregateCommand_ExecDistAggregate(RedisModuleCtx *ctx, RedisModuleString *
.flags = AGGREGATE_REQUEST_NO_CONCURRENT |
AGGREGATE_REQUEST_NO_PARSE_QUERY |
AGGREGATE_REQUEST_SPECLESS};
size_t lookUpLen;
settings.cursorLookupName = RedisModule_StringPtrLen(argv[1], &lookUpLen);
size_t originalLookupNameLen;
const char* originalLookupName = RedisModule_StringPtrLen(argv[1], &originalLookupNameLen);
SearchCluster *sc = GetSearchCluster();
const char *partTag = PartitionTag(&sc->part, sc->myPartition);
size_t taggedLen;
settings.cursorLookupName = writeTaggedId(settings.cursorLookupName, lookUpLen, partTag, strlen(partTag), &taggedLen);
size_t taggedLookupNameLen;
char* taggedLookupName = writeTaggedId(originalLookupName, originalLookupNameLen, partTag, strlen(partTag), &taggedLookupNameLen);
settings.cursorLookupName = taggedLookupName;
AggregateCommand_ExecAggregateEx(ctx, argv, argc, ccx, &settings);
free((char*)settings.cursorLookupName);
free(taggedLookupName);
}

0 comments on commit f256e77

Please sign in to comment.