Added macro for the bloom filter parameters and deleted old unused
macros for crc
This commit is contained in:
@ -1273,7 +1273,7 @@ OBIDMS_avl_p obi_create_avl(OBIDMS_p dms, const char* avl_name)
|
||||
avl->data_fd = avl_data_file_descriptor;
|
||||
|
||||
// Bloom filter
|
||||
bloom_init(&((avl->header)->bloom_filter), 2000000, 0.001); // TODO use macros
|
||||
bloom_init(&((avl->header)->bloom_filter), NODE_COUNT_PER_AVL, BLOOM_FILTER_ERROR_RATE);
|
||||
|
||||
//close(avl_file_descriptor);
|
||||
|
||||
@ -1575,7 +1575,7 @@ index_t insert_in_avl_group(OBIDMS_avl_group_p avl_group, byte_t* value) // TODO
|
||||
|
||||
// not found in any avl: add in current
|
||||
// first, check if make new one
|
||||
if ((((avl_group->sub_avls)[avl_group->current_avl_idx])->header)->nb_items == 2000000) // TODO add condition with data size + use macro
|
||||
if ((((avl_group->sub_avls)[avl_group->current_avl_idx])->header)->nb_items == NODE_COUNT_PER_AVL) // TODO add condition with data size
|
||||
obi_add_new_avl_in_group(avl_group);
|
||||
|
||||
bloom_add(&((((avl_group->sub_avls)[avl_group->current_avl_idx])->header)->bloom_filter), value, (BYTE_ARRAY_HEADER_SIZE + *((int32_t*)(value+1))));
|
||||
|
Reference in New Issue
Block a user