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

[improve] Handle PositionInfo that's too large to serialize as a single entry #17

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

dlg99
Copy link
Owner

@dlg99 dlg99 commented May 28, 2024

Motivation

In some cases cursor position info can be too large to serialize as a single entry, e.g. in case of too many deleted ranges. Also the serialization can be too slow.

cherry-picks of changes by @eolivelli @nicoloboschi and I.

Modifications

Cursor PositionInfo serialization is reworked to produce less garbage/serialize faster; serialized data can be compressed.
In case the serialized data too large it is chunked and saved as a sequence of entries.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests.

Does this pull request potentially affect one of the following parts:

NO

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@dlg99 dlg99 changed the title Cpick/cursor large state [improve] Handle PositionInfo that's too large to serialize as a single entry May 28, 2024
eolivelli and others added 16 commits September 23, 2024 15:53
* serialize/compress without intermediate byte arrays
* use lightproto for cursor serialization to the ledger
* Reuse PositionInfo

(cherry picked from commit 1887c44)
(cherry picked from commit 98a3d25)
* ManagedCursor: manually serialise PositionInfo
* Add tests and save last serialized side to prevent reallocations

(cherry picked from commit 8a365d0)
(cherry picked from commit 44ba614)
(cherry picked from commit c3fe80e)
…footer of the chunked data (apache#282)

(cherry picked from commit 6e72ecb)
@github-actions github-actions bot added the PIP label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants