Skip to content

RYW transactions don't handle append_if_fits correctly #13828

Description

@atn34
$ cat test.py && echo "===" && python3 test.py 
import fdb

fdb.api_version(730)
db = fdb.open()


class Cancel(Exception):
    pass


@fdb.transactional
def do_setup(tr):
    tr[b""] = b"a" * 70000


do_setup(db)


@fdb.transactional
def do_test(tr, write_first):
    if write_first:
        do_setup(tr)
    tr.append_if_fits(b"", b"b" * 20000)
    tr.append_if_fits(b"", b"b" * 20000)
    print(len(tr[b""]))
    raise Cancel()


try:
    do_test(db, False)
except Cancel:
    pass

try:
    do_test(db, True)
except Cancel:
    pass
===
70000
90000

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions