HewlettPackard / HewlettPackard/foedus_code

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

Open
#134 0 comments 0 reactions 1 assignee Claimed by @hkimura View on GitHub
bug
Dominant language
C++
Stars
64
Forks
27
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/hkimura/foedus_code/files/488019/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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.