-
Notifications
You must be signed in to change notification settings - Fork 625
Update remote_documents table to add dedicated parent_path column #3173
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
Conversation
21c1c42
to
7753c9a
Compare
7753c9a
to
cf225f9
Compare
I am working on performance data but don't have anything for now. |
400bd09
to
7f16305
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
How was the performance of the migration?
path, | ||
+ "(collection_path, document_id, read_time_seconds, read_time_nanos, contents) " | ||
+ "VALUES (?, ?, ?, ?, ?)", | ||
collectionForKey(documentKey), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are repeated enough that I think we can add them to DocumentKey
, like key.collection()
and key.documentId()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -571,6 +571,35 @@ public void rewritesCanonicalIds() { | |||
}); | |||
} | |||
|
|||
@Test | |||
public void rewritesDocumentKeys() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to also have a test where the number of documents to migrate exceeds the batch size, to make sure batching works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (04e8289c) is created by Prow via merging commits: d0048fd 0f93b23. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (04e8289c) is created by Prow via merging commits: d0048fd 0f93b23. |
I had to update the PR to add a dedicated parent_path column but keep the other column as is. This allows schema downgrades, as older clients expect |
FYI:
This is for 1775 docs. |
@schmidt-sebastian: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
FYI there is a new version of this PR: https://github.com/firebase/firebase-android-sdk/pull/3192/files |
The current table design reads all documents from subcollections as we scan a collection path. This makes it impossible to fetch the first N documents by using "Limit N", which we would like to do for the Index backfill.