Skip to content

Commit

Permalink
hash: add missing queue init on open
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 30, 2018
1 parent a7481fe commit 170762f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/hash.c
Expand Up @@ -2037,6 +2037,15 @@ grn_hash_open(grn_ctx *ctx, const char *path)
hash->normalizer = grn_ctx_at(ctx, header->normalizer);
}
GRN_PTR_INIT(&(hash->token_filters), GRN_OBJ_VECTOR, GRN_ID_NIL);
{
grn_table_queue *queue;
if (GRN_HASH_IS_LARGE_KEY(hash)) {
queue = &(hash->header.large->queue);
} else {
queue = &(hash->header.normal->queue);
}
grn_table_queue_init(ctx, queue);
}
hash->obj.header.flags = header->flags;
return hash;
} else {
Expand Down

0 comments on commit 170762f

Please sign in to comment.