Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue where the garbage collection in indexes and blobs is not performed in VIO_backout #7747

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

ilya071294
Copy link
Contributor

Steps to reproduce the issue:

  1. Create a database, insert a record, update it in a transaction with no auto undo and rollback.
create table t1_blob (id integer, str1 blob);
create index t1_blob_idx1 on t1_blob (id);
insert into t1_blob values (0, 'abc');
commit;

set transaction no auto undo;
update t1_blob set id = 1, str1 = '123' where id = 0;
rollback;
  1. Close the connection. Execute gstat -r to see that we have 2 record versions (total records: 1, total versions: 1), 2 blobs (Blobs: 2) and 2 index nodes (nodes: 2).
  2. Connect again and execute select to trigger the garbage collection:
select * from t1_blob;
  1. Close the connection. Execute gstat -r again and see that the uncommitted record version is deleted (total versions: 0), but the amount of blobs and index nodes remained unchanged (Blobs: 2, nodes: 2).

The issue starts in VIO_record. There is a call record->reset(format) which clears the REC_gc_active flag by mistake. After that VIO_gc_record reuses the record which is already active.

… performed in VIO_backout

The issue starts in VIO_record. There is a call record->reset(format) which clears the REC_gc_active flag by mistake. After that VIO_gc_record reuses the record which is already active.
@ilya071294 ilya071294 merged commit e9f399e into FirebirdSQL:master Sep 14, 2023
@ilya071294 ilya071294 deleted the fb_5_0_backout_gc_fix branch September 14, 2023 07:41
@ilya071294 ilya071294 self-assigned this Sep 14, 2023
ilya071294 added a commit that referenced this pull request Sep 14, 2023
…and blobs is not performed in VIO_backout

The issue starts in VIO_record. There is a call record->reset(format) which clears the REC_gc_active flag by mistake. After that VIO_gc_record reuses the record which is already active.
ilya071294 added a commit that referenced this pull request Sep 14, 2023
…and blobs is not performed in VIO_backout

The issue starts in VIO_record. There is a call record->reset(format) which clears the REC_gc_active flag by mistake. After that VIO_gc_record reuses the record which is already active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants