-
Notifications
You must be signed in to change notification settings - Fork 624
Update document index entries #3132
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
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (938d3e4c) is created by Prow via merging commits: e3f12a5 001ef5e. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (938d3e4c) is created by Prow via merging commits: e3f12a5 001ef5e. |
89d1109
to
055a51a
Compare
} | ||
/** Represents an index entry saved by the SDK in its local storage. */ | ||
@AutoValue | ||
public abstract class IndexEntry implements Comparable<IndexEntry> { |
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.
Made this an AutoValue so that we have hash/equals. I am also planning to keep this class so I removed the TODO that says it is a placeholder.
@@ -52,9 +52,6 @@ | |||
*/ | |||
List<ResourcePath> getCollectionParents(String collectionId); | |||
|
|||
/** Updates the index entries for the given document. */ | |||
void handleDocumentChange(@Nullable Document oldDocument, @Nullable Document newDocument); |
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.
All updates will be handled by updateIndexEntries
.
|
||
public static int compareByteArrays(byte[] left, byte[] right) { | ||
int size = Math.min(left.length, right.length); | ||
for (int i = 0; i < size; i++) { |
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.
This code is identical with the implementation right below.
/test device-check-changed |
/test check-changed |
document.getKey(), | ||
uid, | ||
directionalValue, | ||
/* arrayValue= */ new byte[] {})); |
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.
Using empty byte array instead of null
makes queries easier.
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.
the code looks great..I have one question on deleted doc.
...base-firestore/src/test/java/com/google/firebase/firestore/local/SQLiteIndexManagerTest.java
Show resolved
Hide resolved
...base-firestore/src/test/java/com/google/firebase/firestore/local/SQLiteIndexManagerTest.java
Show resolved
Hide resolved
/test check-changed |
No description provided.