Skip to content

Configurable bucket count cache duration#695

Merged
rkistner merged 6 commits into
mainfrom
increase-checksum-cache-ttl
Jun 29, 2026
Merged

Configurable bucket count cache duration#695
rkistner merged 6 commits into
mainfrom
increase-checksum-cache-ttl

Conversation

@rkistner

@rkistner rkistner commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

In some cases the bucket checksums and counts are expensive to calculate, so this helps reduce the overhead.

Note that this is a "TTL after use", not "TTL after calculation". So there may be some cases where the cached value is persisted for a long time.

Using a cached value should never result in an incorrect checksum. The main caveat of a longer TTL is that the count may be incorrect after a compact operation, resulting in client-side progress bars being slightly inaccurate. This is why I call this the "bucket count cache" duration instead of "checksum cache" duration.

The default here is still 60 minutes, but it can be increased to a couple of hours without significant risk.

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 12ba7e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@powersync/service-module-postgres-storage Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-core Patch
@powersync/service-types Patch
@powersync/service-schema Patch
@powersync/service-module-convex Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres Patch
@powersync/service-image Patch
@powersync/service-module-core Patch
test-client Patch
@powersync/service-client Patch
@powersync/lib-service-postgres Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rkistner rkistner changed the title Increase checksum cache ttl to 8h Configurable bucket count cache duration Jun 29, 2026
@rkistner rkistner requested a review from stevensJourney June 29, 2026 12:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b136e8ad0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .changeset/solid-trams-happen.md
Comment thread packages/service-core/src/util/config/compound-config-collector.ts Outdated

@stevensJourney stevensJourney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@rkistner rkistner merged commit c2edf86 into main Jun 29, 2026
46 checks passed
@rkistner rkistner deleted the increase-checksum-cache-ttl branch June 29, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants