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

Too-short-record error for repeated record expansions in a single transaction #134

Open
hkimura opened this issue Sep 22, 2016 · 0 comments
Assignees
Labels

Comments

@hkimura
Copy link
Collaborator

hkimura commented Sep 22, 2016

Reported by Gustavo:

Hi Hideaki,

we are facing an issue with the upsert_record that we would like to double check with you.

assume the scenario that we inserted 5 records with a 2 bytes payload each in a masstree.

consider 3 tests:
test 1: update all 5 records to a 10 bytes payload in the same transaction
test 2: update all 5 records to a 700 bytes payload. Each update call in its own transaction (each update is committed separately)
test 3: update all 5 records to a 700 bytes payload in the same transaction (all four updates are committed at the same time)

test 1 and 2 pass, but test 3 fails. we attached a unit test that we created for FOEDUS that shows the issue.

test_masstree_extra.cpp.txt

Haven't taken a look at the code yet, but I (wildly) guess the check on physical record length is seeing the current physical record, thus it returns too-short-payload error on second upsert.

If that's the case, one solution is to apply physical record-expansion during transaction rather than during precommit.

@hkimura hkimura added the bug label Sep 22, 2016
@hkimura hkimura self-assigned this Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant