Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/ensure database number match when snapshotting (#441)
This pull request includes changes to the `hashtable_mcmp_op_get_by_index` function in multiple files to improve the handling of the `database_number` parameter. The changes ensure that the `database_number` is correctly passed and updated within the function calls. Improvements to `hashtable_mcmp_op_get_by_index` function: * [`src/data_structures/hashtable/mcmp/hashtable_op_get.c`](diffhunk://#diff-86e21ce364585344eeb916a45af6eed9ea7e2af80fbff3ff4f83857986757dc0L103-R105): Modified the `hashtable_mcmp_op_get_by_index` function to pass `database_number` as a pointer and update it within the function. [[1]](diffhunk://#diff-86e21ce364585344eeb916a45af6eed9ea7e2af80fbff3ff4f83857986757dc0L103-R105) [[2]](diffhunk://#diff-86e21ce364585344eeb916a45af6eed9ea7e2af80fbff3ff4f83857986757dc0L149-R151) * [`src/data_structures/hashtable/mcmp/hashtable_op_get.h`](diffhunk://#diff-8e1333f9331a063c2477010144b1c4d810d7d405e09439e643ddf90b80cc39e0L18-R20): Updated the function signature of `hashtable_mcmp_op_get_by_index` to reflect the change in `database_number` parameter type. Updates to function calls: * [`src/storage/db/storage_db.c`](diffhunk://#diff-7f9e44ce2f00979e67eb946f380a24688073a061281f7ad59792bbb4aeaf0feeR1635-R1644): Adjusted the call to `hashtable_mcmp_op_get_by_index` to pass `database_number` as a pointer and added a check to ensure the entry is from the correct database before deletion. * [`src/storage/db/storage_db_snapshot.c`](diffhunk://#diff-905ca66f717e9cf869d02cda91a0ae206f7b467cd6d8d78eeaeb04db0d95e1ccL967-R969): Modified the call to `hashtable_mcmp_op_get_by_index` to pass `database_number` as a pointer.
- Loading branch information