AVLs: Added an error check
This commit is contained in:
@ -2463,7 +2463,7 @@ index_t obi_avl_group_add(OBIDMS_avl_group_p avl_group, Obi_blob_p value)
|
||||
// Check if the AVL group is writable
|
||||
if (!(avl_group->writable))
|
||||
{
|
||||
obi_set_errno(OBI_READ_ONLY_INDEXER_ERROR);
|
||||
obi_set_errno(OBI_READ_ONLY_INDEXER_ERROR); // Note: this error is read by the calling functions to clone the AVL group if needed
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2476,7 +2476,10 @@ index_t obi_avl_group_add(OBIDMS_avl_group_p avl_group, Obi_blob_p value)
|
||||
|
||||
// Add in the current AVL
|
||||
index_in_avl = (int32_t) obi_avl_add((avl_group->sub_avls)[avl_group->last_avl_idx], value);
|
||||
bloom_add(&((((avl_group->sub_avls)[avl_group->last_avl_idx])->header)->bloom_filter), value, obi_blob_sizeof(value));
|
||||
if (index_in_avl < 0)
|
||||
return -1;
|
||||
|
||||
bloom_add(&((((avl_group->sub_avls)[avl_group->last_avl_idx])->header)->bloom_filter), value, obi_blob_sizeof(value))
|
||||
|
||||
// Build the index containing the AVL index
|
||||
index_with_avl = avl_group->last_avl_idx;
|
||||
|
Reference in New Issue
Block a user