Drive vectorsdb dimension from the embeddings column only#212
Merged
Conversation
The placeholder-only guard left a stale archived dimension uncorrected when it disagreed with the actual vector column size, while the previous always-sync overwrote it from any vector column. The embeddings column is the schema-defining vector of a vectorsdb collection, so it alone now drives dimension: mismatches are corrected from it and other vector columns never touch the value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR changes how vectorsdb collection dimensions are restored during Appwrite migrations.
Confidence Score: 5/5This looks safe to merge after checking the non-standard vector-column case.
src/Migration/Destinations/Appwrite.php Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/Migration/Destinations/Appwrite.php:1338
**Non-Embeddings Dimension Stays Stale**
When an archived vectorsdb collection has no serialized `dimension` and its vector column is named anything other than `embeddings`, this guard skips the only size-based correction path. The table keeps the placeholder or stale dimension, so the migrated collection can reject later vector writes because its stored dimension no longer matches the actual vector column size.
Reviews (1): Last reviewed commit: "fix: drive vectorsdb dimension from the ..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the P1 on #211: the placeholder-only guard left a stale archived
dimensionuncorrected when it disagreed with the actual vector column size, while the pre-#211 behavior overwrote it from any vector column (the P1 on #210).The
embeddingscolumn is the schema-defining vector of a vectorsdb collection, so it alone now drivesdimension: mismatches (including the pre-dimension-archive placeholder) are corrected from its size, and other vector columns never touch the value. This satisfies both review findings simultaneously.🤖 Generated with Claude Code