Skip to content

[Fix] Keep MongoDB schema inference working when one collection hits the memory limit - #809

Merged
bean1352 merged 1 commit into
mainfrom
fix/mongodb-schema-memory-limit
Sep 17, 2026
Merged

bean1352 merged 1 commit into
mainfrom
fix/mongodb-schema-memory-limit

Conversation

@bean1352

Copy link
Copy Markdown
Contributor

Problem

Sampling a small collection of large documents can exceed MongoDB's sort memory limit (error 146 or 292). getConnectionSchema failed the whole request on that, blocking Sync Config validation and deployment for the entire connection.

Fix

Such a collection is now reported with no columns, the same as an empty one, and a warning is logged. Named columns on it show "column not found" warnings during validation.

Timeouts (error 50) still fail the request: they usually mean the source is overloaded, and degrading them would silently return an empty schema for every collection.

AI disclosure

Written with help from Claude Code, reviewed by me.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7251b6b

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

This PR includes changesets to release 12 packages
Name Type
@powersync/service-module-mongodb Patch
@powersync/service-schema Patch
@powersync/service-image Patch
@powersync/service-core Patch
@powersync/service-module-convex Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
test-client 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

@bean1352
bean1352 merged commit 155febf into main Sep 17, 2026
50 checks passed
@bean1352
bean1352 deleted the fix/mongodb-schema-memory-limit branch September 17, 2026 09:23
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