Skip to content

Commit

Permalink
Merge pull request #18 from yaeltzirulnikov/yael-use_rax_instead_link…
Browse files Browse the repository at this point in the history
…ed_list

use RedisModuleDict instead linked list
  • Loading branch information
danni-m committed Nov 14, 2018
2 parents 3675c1a + 2248b4c commit da554db
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: 'redislabsmodules/rmbuilder:latest'
- image: 'redislabsmodules/rmbuilder:5.0.1'
environment:
MODULE_ARTIFACT: redis-tsdb-module.so
steps:
Expand Down
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int TSDB_info(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithSimpleString(ctx, "retentionSecs");
RedisModule_ReplyWithLongLong(ctx, series->retentionSecs);
RedisModule_ReplyWithSimpleString(ctx, "chunkCount");
RedisModule_ReplyWithLongLong(ctx, series->chunkCount);
RedisModule_ReplyWithLongLong(ctx, RedisModule_DictSize(series->chunks));
RedisModule_ReplyWithSimpleString(ctx, "maxSamplesPerChunk");
RedisModule_ReplyWithLongLong(ctx, series->maxSamplesPerChunk);

Expand Down
7 changes: 1 addition & 6 deletions src/rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@ void series_rdb_save(RedisModuleIO *io, void *value)
rule = rule->nextRule;
}

Chunk *chunk = series->firstChunk;
size_t numSamples =0;
while (chunk != NULL) {
numSamples += ChunkNumOfSample(chunk);
chunk = chunk->nextChunk;
}
size_t numSamples = SeriesGetNumSamples(series);
RedisModule_SaveUnsigned(io, numSamples);

SeriesIterator iter = SeriesQuery(series, 0, series->lastTimestamp);
Expand Down
345 changes: 0 additions & 345 deletions src/redismodule.h

This file was deleted.

Loading

0 comments on commit da554db

Please sign in to comment.