Skip to content

Commit 5859e55

Browse files
committed
Review feedback
1 parent 6aecf2e commit 5859e55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteMutationQueue.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ private MutationBatch decodeInlineMutationBatch(int batchId, byte[] bytes) {
434434

435435
BlobAccumulator accumulator = new BlobAccumulator(bytes);
436436
while (accumulator.more) {
437+
// As we read in chunks the start of the next chunk should be the total accumulated length
438+
// plus 1 (since SUBSTR() counts from 1). The second argument is not adjusted because it's
439+
// the length of the chunk, not the end index.
437440
int start = accumulator.numChunks() * BLOB_MAX_INLINE_LENGTH + 1;
438441

439442
db.query("SELECT SUBSTR(mutations, ?, ?) FROM mutations WHERE uid = ? AND batch_id = ?")

0 commit comments

Comments
 (0)