internal/gcp/firestore: use Limit to avoid timeout calls

We pick default N=1000 and keep grabbing docs in buckets of size N. This
should avoid the need to catch timeout errors.

A follow-up CL will try to simplify tests.

Updates golang/oscar#6

Change-Id: I6eff9bdbefd163fabf98f89c6280a72608b82d0d
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/607196
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/gcp/firestore/firestore.go b/internal/gcp/firestore/firestore.go
index dd2013a..14d80dd 100644
--- a/internal/gcp/firestore/firestore.go
+++ b/internal/gcp/firestore/firestore.go
@@ -31,7 +31,6 @@
 	"cloud.google.com/go/firestore"
 	"golang.org/x/oscar/internal/gcp/grpcerrors"
 	"golang.org/x/oscar/internal/storage"
-	"google.golang.org/api/iterator"
 	"google.golang.org/api/option"
 )
 
@@ -161,6 +160,8 @@
 	}
 }
 
+const docLimit = 1000 // limit on number or docs to fetch in a single query
+
 // scan returns an iterator over the documents in the collection coll whose IDs are
 // between start and end, inclusive.
 // An empty string for start or end indicates the beginning of the collection.
@@ -173,49 +174,35 @@
 	}
 
 	return func(yield func(*firestore.DocumentSnapshot) bool) {
-		var iter *firestore.DocumentIterator
-		newIter := func(start string) {
-			query := coll.OrderBy(firestore.DocumentID, firestore.Asc).EndAt(end)
+		next := func(start string) *firestore.DocumentIterator {
+			query := coll.OrderBy(firestore.DocumentID, firestore.Asc).Limit(docLimit).EndAt(end)
 			if start != "" {
 				query = query.StartAt(start)
 			}
 			if tx == nil {
-				iter = query.Documents(context.TODO())
-			} else {
-				iter = tx.Documents(query)
+				return query.Documents(context.TODO())
 			}
+			return tx.Documents(query)
 		}
-		newIter(start)
-		// Note: Do not use defer iter.Stop(),
-		// because iter can change and we want
-		// to stop the final value of iter, not its current value.
-		defer func() {
-			iter.Stop()
-		}()
-		var last string
+		last := start
 		for {
-			ds, err := iter.Next()
-			if err == iterator.Done {
-				return
-			}
-			if grpcerrors.IsUnavailable(err) && last != "" {
-				// A Scan that runs for more than 60 seconds dies with
-				//	syncdb: 22:38:20 ERROR firestore scan collection=projects/oscar-go-1/databases/prod/documents/values err="rpc error: code = Unavailable desc = Query timed out. Please try either limiting the entities scanned, or run with an updated index configuration."
-				// To allow long scans, restart after the last document we saw.
-				f.slog.Info("firestore scan error; restarting", "last", storage.Fmt(decodeKey(last)), "err", err)
-				iter.Stop()
-				newIter(keyAfter(last))
-				last = ""
-				continue
-			}
+			page := next(last)
+			docs, err := page.GetAll()
 			if err != nil {
-				// unreachable except for bad DB
+				// Unreachable except for bad DB or potential 60 seconds timeout
+				//	syncdb: 22:38:20 ERROR firestore scan collection=projects/oscar-go-1/databases/prod/documents/values err="rpc error: code = Unavailable desc = Query timed out. Please try either limiting the entities scanned, or run with an updated index configuration."
+				// The timeout should not happen now with Query.Limit(docLimit).
 				f.Panic("firestore scan", "collection", coll.Path, "err", err)
 			}
-			last = ds.Ref.ID
-			if !yield(ds) {
+			for _, ds := range docs {
+				if !yield(ds) {
+					return
+				}
+			}
+			if len(docs) < docLimit { // no more things to fetch
 				return
 			}
+			last = keyAfter(docs[len(docs)-1].Ref.ID)
 		}
 	}
 }
diff --git a/internal/gcp/firestore/testdata/db.grpcrr b/internal/gcp/firestore/testdata/db.grpcrr
index 3c86d26..a73a3a8 100644
--- a/internal/gcp/firestore/testdata/db.grpcrr
+++ b/internal/gcp/firestore/testdata/db.grpcrr
@@ -1,25 +1,25 @@
 RPCReTxt1
-"oscar-432119"
+"oscar-go-1"
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-234
+230
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/c/d"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/c/d"
   }
 }
 ref_index: 1
-252
+250
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/c/d"
+    missing: "projects/oscar-go-1/databases/test/documents/c/d"
     read_time: {
-      seconds: 1723318738
-      nanos: 264046000
+      seconds: 1724185282
+      nanos: 206467000
     }
   }
 }
@@ -28,15 +28,15 @@
 kind: RECV
 is_error: true
 ref_index: 1
-425
+421
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/6b6579"
+        name: "projects/oscar-go-1/databases/test/documents/values/6b6579"
         fields: {
           key: "V"
           value: {
@@ -53,13 +53,13 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318738
-        nanos: 779379000
+        seconds: 1724185282
+        nanos: 709885000
       }
     }
     commit_time: {
-      seconds: 1723318738
-      nanos: 779379000
+      seconds: 1724185282
+      nanos: 709885000
     }
   }
 }
@@ -67,21 +67,21 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-244
+240
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/values/6b6579"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/values/6b6579"
   }
 }
 ref_index: 7
-543
+541
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
     found: {
-      name: "projects/oscar-432119/databases/test/documents/values/6b6579"
+      name: "projects/oscar-go-1/databases/test/documents/values/6b6579"
       fields: {
         key: "V"
         value: {
@@ -89,17 +89,17 @@
         }
       }
       create_time: {
-        seconds: 1723318738
-        nanos: 779379000
+        seconds: 1724185282
+        nanos: 709885000
       }
       update_time: {
-        seconds: 1723318738
-        nanos: 779379000
+        seconds: 1724185282
+        nanos: 709885000
       }
     }
     read_time: {
-      seconds: 1723318738
-      nanos: 863533000
+      seconds: 1724185282
+      nanos: 826334000
     }
   }
 }
@@ -111,23 +111,23 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-253
+249
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/values/6d697373696e67"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/values/6d697373696e67"
   }
 }
 ref_index: 11
-271
+268
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/values/6d697373696e67"
+    missing: "projects/oscar-go-1/databases/test/documents/values/6d697373696e67"
     read_time: {
-      seconds: 1723318738
-      nanos: 899413000
+      seconds: 1724185283
+      nanos: 56285000
     }
   }
 }
@@ -136,25 +136,25 @@
 kind: RECV
 is_error: true
 ref_index: 11
-290
+286
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/6b6579"
+      delete: "projects/oscar-go-1/databases/test/documents/values/6b6579"
     }
   }
 }
-203
+204
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {}
     commit_time: {
-      seconds: 1723318739
-      nanos: 38176000
+      seconds: 1724185283
+      nanos: 179946000
     }
   }
 }
@@ -162,23 +162,23 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-245
+241
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/values/6b6579"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/values/6b6579"
   }
 }
 ref_index: 17
-263
+261
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/values/6b6579"
+    missing: "projects/oscar-go-1/databases/test/documents/values/6b6579"
     read_time: {
-      seconds: 1723318739
-      nanos: 111682000
+      seconds: 1724185283
+      nanos: 179946000
     }
   }
 }
@@ -187,31 +187,31 @@
 kind: RECV
 is_error: true
 ref_index: 17
-213
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-413
+412
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11^\xa2\xff\x07\x13\xc6\x16z\"Y\x00\xb8>\xbb\x0eGW\x8c\x1d8\x14\xda}1-xBj\xa6\x97~\x08䬡\x93\xabȒ\x89\xdbI\x13?\x18\xdb\xf8E[\x8b\xd6T\xfdcB\x1d\x91\x9bq[\x06\xf3\x10M\xcd\xd4p\xae\xfd)\xc1\xdbq\xf8\xf3Mu\xa2݃$%\xb0\x05\x87\x9e\x9fb\x0b\xb9b\xefd\xc5\xcb\x17\xa7\x83\x93"
+    transaction: "\x11\xb2&\\\xf6\x1d5g\xbd\"Y\x00\xb8>\xbb\x0e\x97\"\xf4\x8c\x81-\x15\xfdw\xe1$\r\xbf\x85\xccEvv2\x00\xa3\xd5\xf5I(\x83\xf3\xbf\xad\x1c\x9f3\xae\xed\xe7\xfe:\xc5,c\xc69u9\r\x11\xe0\xe6<\xcc\xc5C\xda\x17 \xa8Ăfo\x8dR,\x7f=|\xd3\xf7+\xb4:\xf7M\x80\xe4ã\"\x8e\xa7,\xa9\x16\xab"
   }
 }
 ref_index: 21
-2748
+2725
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3000"
+        name: "projects/oscar-go-1/databases/test/documents/values/3000"
         fields: {
           key: "V"
           value: {
@@ -222,7 +222,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3001"
+        name: "projects/oscar-go-1/databases/test/documents/values/3001"
         fields: {
           key: "V"
           value: {
@@ -233,7 +233,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3002"
+        name: "projects/oscar-go-1/databases/test/documents/values/3002"
         fields: {
           key: "V"
           value: {
@@ -244,7 +244,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3003"
+        name: "projects/oscar-go-1/databases/test/documents/values/3003"
         fields: {
           key: "V"
           value: {
@@ -255,7 +255,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3004"
+        name: "projects/oscar-go-1/databases/test/documents/values/3004"
         fields: {
           key: "V"
           value: {
@@ -266,7 +266,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3005"
+        name: "projects/oscar-go-1/databases/test/documents/values/3005"
         fields: {
           key: "V"
           value: {
@@ -277,7 +277,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3006"
+        name: "projects/oscar-go-1/databases/test/documents/values/3006"
         fields: {
           key: "V"
           value: {
@@ -288,7 +288,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3007"
+        name: "projects/oscar-go-1/databases/test/documents/values/3007"
         fields: {
           key: "V"
           value: {
@@ -299,7 +299,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3008"
+        name: "projects/oscar-go-1/databases/test/documents/values/3008"
         fields: {
           key: "V"
           value: {
@@ -310,7 +310,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3009"
+        name: "projects/oscar-go-1/databases/test/documents/values/3009"
         fields: {
           key: "V"
           value: {
@@ -319,76 +319,76 @@
         }
       }
     }
-    transaction: "\x11^\xa2\xff\x07\x13\xc6\x16z\"Y\x00\xb8>\xbb\x0eGW\x8c\x1d8\x14\xda}1-xBj\xa6\x97~\x08䬡\x93\xabȒ\x89\xdbI\x13?\x18\xdb\xf8E[\x8b\xd6T\xfdcB\x1d\x91\x9bq[\x06\xf3\x10M\xcd\xd4p\xae\xfd)\xc1\xdbq\xf8\xf3Mu\xa2݃$%\xb0\x05\x87\x9e\x9fb\x0b\xb9b\xefd\xc5\xcb\x17\xa7\x83\x93"
+    transaction: "\x11\xb2&\\\xf6\x1d5g\xbd\"Y\x00\xb8>\xbb\x0e\x97\"\xf4\x8c\x81-\x15\xfdw\xe1$\r\xbf\x85\xccEvv2\x00\xa3\xd5\xf5I(\x83\xf3\xbf\xad\x1c\x9f3\xae\xed\xe7\xfe:\xc5,c\xc69u9\r\x11\xe0\xe6<\xcc\xc5C\xda\x17 \xa8Ăfo\x8dR,\x7f=|\xd3\xf7+\xb4:\xf7M\x80\xe4ã\"\x8e\xa7,\xa9\x16\xab"
   }
 }
-1271
+1272
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318658
-        nanos: 91276000
+        seconds: 1723728574
+        nanos: 392864000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     commit_time: {
-      seconds: 1723318739
-      nanos: 342584000
+      seconds: 1724185283
+      nanos: 585583000
     }
   }
 }
@@ -396,11 +396,11 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-668
+705
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -413,99 +413,18 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3003"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3003"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3006"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3006"
         }
       }
-    }
-  }
-}
-ref_index: 25
-532
-kind: RECV
-message: {
-  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
-    document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3003"
-      fields: {
-        key: "V"
-        value: {
-          bytes_value: "3"
-        }
+      limit: {
+        value: 1000
       }
-      create_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-      update_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-    }
-    read_time: {
-      seconds: 1723318739
-      nanos: 441061000
-    }
-  }
-}
-ref_index: 25
-532
-kind: RECV
-message: {
-  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
-    document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3004"
-      fields: {
-        key: "V"
-        value: {
-          bytes_value: "4"
-        }
-      }
-      create_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-      update_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-    }
-    read_time: {
-      seconds: 1723318739
-      nanos: 441061000
-    }
-  }
-}
-ref_index: 25
-532
-kind: RECV
-message: {
-  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
-    document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3005"
-      fields: {
-        key: "V"
-        value: {
-          bytes_value: "5"
-        }
-      }
-      create_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-      update_time: {
-        seconds: 1723318739
-        nanos: 342584000
-      }
-    }
-    read_time: {
-      seconds: 1723318739
-      nanos: 441061000
     }
   }
 }
@@ -515,7 +434,91 @@
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3006"
+      name: "projects/oscar-go-1/databases/test/documents/values/3003"
+      fields: {
+        key: "V"
+        value: {
+          bytes_value: "3"
+        }
+      }
+      create_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+      update_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+    }
+    read_time: {
+      seconds: 1724185283
+      nanos: 680139000
+    }
+  }
+}
+ref_index: 25
+530
+kind: RECV
+message: {
+  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
+    document: {
+      name: "projects/oscar-go-1/databases/test/documents/values/3004"
+      fields: {
+        key: "V"
+        value: {
+          bytes_value: "4"
+        }
+      }
+      create_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+      update_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+    }
+    read_time: {
+      seconds: 1724185283
+      nanos: 680139000
+    }
+  }
+}
+ref_index: 25
+530
+kind: RECV
+message: {
+  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
+    document: {
+      name: "projects/oscar-go-1/databases/test/documents/values/3005"
+      fields: {
+        key: "V"
+        value: {
+          bytes_value: "5"
+        }
+      }
+      create_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+      update_time: {
+        seconds: 1724185283
+        nanos: 585583000
+      }
+    }
+    read_time: {
+      seconds: 1724185283
+      nanos: 680139000
+    }
+  }
+}
+ref_index: 25
+530
+kind: RECV
+message: {
+  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
+    document: {
+      name: "projects/oscar-go-1/databases/test/documents/values/3006"
       fields: {
         key: "V"
         value: {
@@ -523,17 +526,17 @@
         }
       }
       create_time: {
-        seconds: 1723318658
-        nanos: 91276000
+        seconds: 1723728574
+        nanos: 392864000
       }
       update_time: {
-        seconds: 1723318658
-        nanos: 91276000
+        seconds: 1723728574
+        nanos: 392864000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 441061000
+      seconds: 1724185283
+      nanos: 680139000
     }
   }
 }
@@ -545,11 +548,11 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-668
+705
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -562,25 +565,28 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3003"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3003"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3006"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3006"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
 ref_index: 32
-532
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3003"
+      name: "projects/oscar-go-1/databases/test/documents/values/3003"
       fields: {
         key: "V"
         value: {
@@ -588,27 +594,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 563762000
+      seconds: 1724185283
+      nanos: 890098000
     }
   }
 }
 ref_index: 32
-532
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3004"
+      name: "projects/oscar-go-1/databases/test/documents/values/3004"
       fields: {
         key: "V"
         value: {
@@ -616,27 +622,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 563762000
+      seconds: 1724185283
+      nanos: 890098000
     }
   }
 }
 ref_index: 32
-532
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3005"
+      name: "projects/oscar-go-1/databases/test/documents/values/3005"
       fields: {
         key: "V"
         value: {
@@ -644,29 +650,61 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 563762000
+      seconds: 1724185283
+      nanos: 890098000
     }
   }
 }
 ref_index: 32
+530
+kind: RECV
+message: {
+  [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
+    document: {
+      name: "projects/oscar-go-1/databases/test/documents/values/3006"
+      fields: {
+        key: "V"
+        value: {
+          bytes_value: "6"
+        }
+      }
+      create_time: {
+        seconds: 1723728574
+        nanos: 392864000
+      }
+      update_time: {
+        seconds: 1723728574
+        nanos: 392864000
+      }
+    }
+    read_time: {
+      seconds: 1724185283
+      nanos: 890098000
+    }
+  }
+}
+ref_index: 32
+40
+kind: RECV
+is_error: true
+ref_index: 32
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-668
+705
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -679,25 +717,28 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3004"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3004"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3007"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3007"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
-ref_index: 37
-532
+ref_index: 39
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3004"
+      name: "projects/oscar-go-1/databases/test/documents/values/3004"
       fields: {
         key: "V"
         value: {
@@ -705,27 +746,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 650345000
+      seconds: 1724185284
+      nanos: 68114000
     }
   }
 }
-ref_index: 37
-532
+ref_index: 39
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3005"
+      name: "projects/oscar-go-1/databases/test/documents/values/3005"
       fields: {
         key: "V"
         value: {
@@ -733,27 +774,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 650345000
+      seconds: 1724185284
+      nanos: 68114000
     }
   }
 }
-ref_index: 37
-530
+ref_index: 39
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3006"
+      name: "projects/oscar-go-1/databases/test/documents/values/3006"
       fields: {
         key: "V"
         value: {
@@ -761,27 +802,27 @@
         }
       }
       create_time: {
-        seconds: 1723318658
-        nanos: 91276000
+        seconds: 1723728574
+        nanos: 392864000
       }
       update_time: {
-        seconds: 1723318658
-        nanos: 91276000
+        seconds: 1723728574
+        nanos: 392864000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 650345000
+      seconds: 1724185284
+      nanos: 68114000
     }
   }
 }
-ref_index: 37
-532
+ref_index: 39
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3007"
+      name: "projects/oscar-go-1/databases/test/documents/values/3007"
       fields: {
         key: "V"
         value: {
@@ -789,42 +830,42 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 650345000
+      seconds: 1724185284
+      nanos: 68114000
     }
   }
 }
-ref_index: 37
+ref_index: 39
 40
 kind: RECV
 is_error: true
-ref_index: 37
-581
+ref_index: 39
+571
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BatchWrite"
 message: {
   [type.googleapis.com/google.firestore.v1.BatchWriteRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3004"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3004"
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3005"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3005"
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3006"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3006"
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3007"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3007"
     }
   }
 }
@@ -842,15 +883,15 @@
     status: {}
   }
 }
-ref_index: 44
+ref_index: 46
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-668
+705
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -863,25 +904,28 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/2fff"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/2fff"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/300b"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/300b"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3000"
+      name: "projects/oscar-go-1/databases/test/documents/values/3000"
       fields: {
         key: "V"
         value: {
@@ -889,27 +933,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3001"
+      name: "projects/oscar-go-1/databases/test/documents/values/3001"
       fields: {
         key: "V"
         value: {
@@ -917,27 +961,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3002"
+      name: "projects/oscar-go-1/databases/test/documents/values/3002"
       fields: {
         key: "V"
         value: {
@@ -945,27 +989,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3003"
+      name: "projects/oscar-go-1/databases/test/documents/values/3003"
       fields: {
         key: "V"
         value: {
@@ -973,27 +1017,27 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3008"
+      name: "projects/oscar-go-1/databases/test/documents/values/3008"
       fields: {
         key: "V"
         value: {
@@ -1001,27 +1045,27 @@
         }
       }
       create_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
-532
+ref_index: 48
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3009"
+      name: "projects/oscar-go-1/databases/test/documents/values/3009"
       fields: {
         key: "V"
         value: {
@@ -1029,49 +1073,49 @@
         }
       }
       create_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     read_time: {
-      seconds: 1723318739
-      nanos: 910154000
+      seconds: 1724185284
+      nanos: 388786000
     }
   }
 }
-ref_index: 46
+ref_index: 48
 40
 kind: RECV
 is_error: true
-ref_index: 46
-213
+ref_index: 48
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-391
+385
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11\xd1\xfa\x9f\x19c\x91\"\xb7\"Y\x00\xb8>\xbb\x0e>-,\xaf\xe46ce\x05\xbc<\x00\xa6\xe5\x9f\xcf2c\xdc\xe7qaᄊD\xfb{X\nb'\x90\xe4\xdd\xd8]\x083\x05X`|\x9fW \xff\xc5\xe3`8T\x9ap&\x158\x11]Ni_\x1c&љ\x95\xc0\x1e+\xd2-\x15LY\xce\x1f2\x9a\xfa\xe5\x1c\x85\x1b"
+    transaction: "\x11\xb6o\xa2\x11\xc1\xc5\xd4|\"Y\x00\xb8>\xbb\x0e\x88\x1a\xd3?ǯ\x8cu\xafZ\x12\n\xc2`3E\x02~\xa3l𧕟\xec\xc4|L\xa6\x83叴\x17\xf4\x81\xf17!4\x88\x87\x97bzI}\xe4[\"\xaa4\xa0\xb7\xb6\x7f\x9d\xb0\xbc\xa4H\x1b\x11Ȍ8%\x81ZfP\xf9\xd0=A1#J7;\x0cZI\xea"
   }
 }
-ref_index: 55
+ref_index: 57
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-941
+972
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -1084,26 +1128,29 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3000"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3000"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/3000"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/3000"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
-    transaction: "\x11\xd1\xfa\x9f\x19c\x91\"\xb7\"Y\x00\xb8>\xbb\x0e>-,\xaf\xe46ce\x05\xbc<\x00\xa6\xe5\x9f\xcf2c\xdc\xe7qaᄊD\xfb{X\nb'\x90\xe4\xdd\xd8]\x083\x05X`|\x9fW \xff\xc5\xe3`8T\x9ap&\x158\x11]Ni_\x1c&љ\x95\xc0\x1e+\xd2-\x15LY\xce\x1f2\x9a\xfa\xe5\x1c\x85\x1b"
+    transaction: "\x11\xb6o\xa2\x11\xc1\xc5\xd4|\"Y\x00\xb8>\xbb\x0e\x88\x1a\xd3?ǯ\x8cu\xafZ\x12\n\xc2`3E\x02~\xa3l𧕟\xec\xc4|L\xa6\x83叴\x17\xf4\x81\xf17!4\x88\x87\x97bzI}\xe4[\"\xaa4\xa0\xb7\xb6\x7f\x9d\xb0\xbc\xa4H\x1b\x11Ȍ8%\x81ZfP\xf9\xd0=A1#J7;\x0cZI\xea"
   }
 }
-ref_index: 57
-532
+ref_index: 59
+530
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3000"
+      name: "projects/oscar-go-1/databases/test/documents/values/3000"
       fields: {
         key: "V"
         value: {
@@ -1111,37 +1158,37 @@
         }
       }
       create_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
       update_time: {
-        seconds: 1723318739
-        nanos: 342584000
+        seconds: 1724185283
+        nanos: 585583000
       }
     }
     read_time: {
-      seconds: 1723318740
-      nanos: 146857000
+      seconds: 1724185284
+      nanos: 667977000
     }
   }
 }
-ref_index: 57
+ref_index: 59
 40
 kind: RECV
 is_error: true
-ref_index: 57
-2166
+ref_index: 59
+2136
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3000"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3000"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3000"
+        name: "projects/oscar-go-1/databases/test/documents/values/3000"
         fields: {
           key: "V"
           value: {
@@ -1151,11 +1198,11 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3001"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3001"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3002"
+        name: "projects/oscar-go-1/databases/test/documents/values/3002"
         fields: {
           key: "V"
           value: {
@@ -1165,11 +1212,11 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3002"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3002"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3004"
+        name: "projects/oscar-go-1/databases/test/documents/values/3004"
         fields: {
           key: "V"
           value: {
@@ -1179,11 +1226,11 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3003"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3003"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3006"
+        name: "projects/oscar-go-1/databases/test/documents/values/3006"
         fields: {
           key: "V"
           value: {
@@ -1193,11 +1240,11 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3004"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3004"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/3008"
+        name: "projects/oscar-go-1/databases/test/documents/values/3008"
         fields: {
           key: "V"
           value: {
@@ -1207,9 +1254,9 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/3000"
+      delete: "projects/oscar-go-1/databases/test/documents/values/3000"
     }
-    transaction: "\x11\xd1\xfa\x9f\x19c\x91\"\xb7\"Y\x00\xb8>\xbb\x0e>-,\xaf\xe46ce\x05\xbc<\x00\xa6\xe5\x9f\xcf2c\xdc\xe7qaᄊD\xfb{X\nb'\x90\xe4\xdd\xd8]\x083\x05X`|\x9fW \xff\xc5\xe3`8T\x9ap&\x158\x11]Ni_\x1c&љ\x95\xc0\x1e+\xd2-\x15LY\xce\x1f2\x9a\xfa\xe5\x1c\x85\x1b"
+    transaction: "\x11\xb6o\xa2\x11\xc1\xc5\xd4|\"Y\x00\xb8>\xbb\x0e\x88\x1a\xd3?ǯ\x8cu\xafZ\x12\n\xc2`3E\x02~\xa3l𧕟\xec\xc4|L\xa6\x83叴\x17\xf4\x81\xf17!4\x88\x87\x97bzI}\xe4[\"\xaa4\xa0\xb7\xb6\x7f\x9d\xb0\xbc\xa4H\x1b\x11Ȍ8%\x81ZfP\xf9\xd0=A1#J7;\x0cZI\xea"
   }
 }
 598
@@ -1225,33 +1272,33 @@
     write_results: {}
     write_results: {
       update_time: {
-        seconds: 1723318740
-        nanos: 249082000
+        seconds: 1724185284
+        nanos: 847825000
       }
     }
     write_results: {}
     write_results: {
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     write_results: {}
     commit_time: {
-      seconds: 1723318740
-      nanos: 249082000
+      seconds: 1724185284
+      nanos: 847825000
     }
   }
 }
-ref_index: 61
+ref_index: 63
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-668
+705
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -1264,25 +1311,28 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/2fff"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/2fff"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/300b"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/300b"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
-ref_index: 63
-532
+ref_index: 65
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3006"
+      name: "projects/oscar-go-1/databases/test/documents/values/3006"
       fields: {
         key: "V"
         value: {
@@ -1290,27 +1340,27 @@
         }
       }
       create_time: {
-        seconds: 1723318740
-        nanos: 249082000
+        seconds: 1724185284
+        nanos: 847825000
       }
       update_time: {
-        seconds: 1723318740
-        nanos: 249082000
+        seconds: 1724185284
+        nanos: 847825000
       }
     }
     read_time: {
-      seconds: 1723318740
-      nanos: 360199000
+      seconds: 1724185285
+      nanos: 10651000
     }
   }
 }
-ref_index: 63
-532
+ref_index: 65
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3008"
+      name: "projects/oscar-go-1/databases/test/documents/values/3008"
       fields: {
         key: "V"
         value: {
@@ -1318,27 +1368,27 @@
         }
       }
       create_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     read_time: {
-      seconds: 1723318740
-      nanos: 360199000
+      seconds: 1724185285
+      nanos: 10651000
     }
   }
 }
-ref_index: 63
-532
+ref_index: 65
+529
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/values/3009"
+      name: "projects/oscar-go-1/databases/test/documents/values/3009"
       fields: {
         key: "V"
         value: {
@@ -1346,50 +1396,50 @@
         }
       }
       create_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
       update_time: {
-        seconds: 1723318657
-        nanos: 125273000
+        seconds: 1723036833
+        nanos: 404845000
       }
     }
     read_time: {
-      seconds: 1723318740
-      nanos: 360199000
+      seconds: 1724185285
+      nanos: 10651000
     }
   }
 }
-ref_index: 63
+ref_index: 65
 40
 kind: RECV
 is_error: true
-ref_index: 63
-213
+ref_index: 65
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-401
+400
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11\xbf\x90Sb\xa10\x8b'\"Y\x00\xb8>\xbb\x0e9\xb2g\ti5byh\x9c\x8c\xee \xdc\xd9<Ȁ\xf3\x90\xe8\x88C\x04\xc95\x14\xf4{\xf7\xc4\xd2\xeeԇ\x95'\xf5\xd5\x18\x13\xa5\n\xb1\x1b-=\x17\xb2,\xd6;\xb6\x8c\xe7\x01\"\xe7ړRE\xd9\xf8\x1c\xdej\xd0A(-\x9e\x92\x1bٙۜAѸt\xde\xc8"
+    transaction: "\x11\xd5\x0f}\x0fmN\xacg\"Y\x00\xb8>\xbb\x0e\xab\xa2\t\x16\x13;0\x11#.\xa55\x04\xd1A\xa3C\x95\xec\xf0r5`\xael\xf0\xcaJ\xf9\x99\xaf\xd0o\xf5\x15v\xd20:\xe6\x13\xf0?M\xdeF\xd2c\xd0b\xac]\x19\xf3Y{\xf1\xe4\xa71\xe2\xf3\r6\xb9xW\xf6\xfe>~[w1\x89!b\xfe0x%\x96\xfa\x83"
   }
 }
-ref_index: 69
-709
+ref_index: 71
+704
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/values/01610000"
+        name: "projects/oscar-go-1/databases/test/documents/values/01610000"
         fields: {
           key: "V"
           value: {
@@ -1398,7 +1448,7 @@
         }
       }
     }
-    transaction: "\x11\xbf\x90Sb\xa10\x8b'\"Y\x00\xb8>\xbb\x0e9\xb2g\ti5byh\x9c\x8c\xee \xdc\xd9<Ȁ\xf3\x90\xe8\x88C\x04\xc95\x14\xf4{\xf7\xc4\xd2\xeeԇ\x95'\xf5\xd5\x18\x13\xa5\n\xb1\x1b-=\x17\xb2,\xd6;\xb6\x8c\xe7\x01\"\xe7ړRE\xd9\xf8\x1c\xdej\xd0A(-\x9e\x92\x1bٙۜAѸt\xde\xc8"
+    transaction: "\x11\xd5\x0f}\x0fmN\xacg\"Y\x00\xb8>\xbb\x0e\xab\xa2\t\x16\x13;0\x11#.\xa55\x04\xd1A\xa3C\x95\xec\xf0r5`\xael\xf0\xcaJ\xf9\x99\xaf\xd0o\xf5\x15v\xd20:\xe6\x13\xf0?M\xdeF\xd2c\xd0b\xac]\x19\xf3Y{\xf1\xe4\xa71\xe2\xf3\r6\xb9xW\xf6\xfe>~[w1\x89!b\xfe0x%\x96\xfa\x83"
   }
 }
 291
@@ -1407,25 +1457,25 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318740
-        nanos: 594999000
+        seconds: 1724185285
+        nanos: 259621000
       }
     }
     commit_time: {
-      seconds: 1723318740
-      nanos: 594999000
+      seconds: 1724185285
+      nanos: 259621000
     }
   }
 }
-ref_index: 71
-292
+ref_index: 73
+288
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/values/01610000"
+      delete: "projects/oscar-go-1/databases/test/documents/values/01610000"
     }
   }
 }
@@ -1435,35 +1485,35 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {}
     commit_time: {
-      seconds: 1723318740
-      nanos: 704400000
+      seconds: 1724185285
+      nanos: 381447000
     }
   }
 }
-ref_index: 73
-213
+ref_index: 75
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-410
+392
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11\xden\xb7!̉%S\"Y\x00\xb8>\xbb\x0e`\xa9(\x1cE\xc3\xd2\x1c\xf1\x97\"\xb1<K\xffx\xb7\x12\x1b}?\\\xbb\x94_J\xf3\xc8o\xc66\xb7>\x93\xa6=\x92\xc1\x8a\xf3\x18%\"\xa3dk\xcd\x03T6]\x81J\xcc\x12\x8fe\x07e\xd1\xfe\x83\xec\xc7\x01\xb0%'\x1f\x8eL\xcfv\xa3\x9d7\xcc\x03\x07)\x06F/B"
+    transaction: "\x11\xb4\xcaW֋r!\x9f\"Y\x00\xb8>\xbb\x0e\xca';\xa7\x07}}\xbf\xe0\x02\xcf\xdd\xdeU\x0c\xe4\xa0\x19?d\xe3:\xa3\xde?en5\xde\xe3@\xbfL\xf3\x07L\xf0\xc3\xe0_\"ga\xfc\xa8\x89\x92\xe8\xc8>%)cq\x92-g\xb5\rCc\x92j4$E\x9aaZ8\x079\t\x93L\xd7\x1b\xe8}\x1f\x8a\x83 o"
   }
 }
-ref_index: 75
-485
+ref_index: 77
+465
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    transaction: "\x11\xden\xb7!̉%S\"Y\x00\xb8>\xbb\x0e`\xa9(\x1cE\xc3\xd2\x1c\xf1\x97\"\xb1<K\xffx\xb7\x12\x1b}?\\\xbb\x94_J\xf3\xc8o\xc66\xb7>\x93\xa6=\x92\xc1\x8a\xf3\x18%\"\xa3dk\xcd\x03T6]\x81J\xcc\x12\x8fe\x07e\xd1\xfe\x83\xec\xc7\x01\xb0%'\x1f\x8eL\xcfv\xa3\x9d7\xcc\x03\x07)\x06F/B"
+    database: "projects/oscar-go-1/databases/test"
+    transaction: "\x11\xb4\xcaW֋r!\x9f\"Y\x00\xb8>\xbb\x0e\xca';\xa7\x07}}\xbf\xe0\x02\xcf\xdd\xdeU\x0c\xe4\xa0\x19?d\xe3:\xa3\xde?en5\xde\xe3@\xbfL\xf3\x07L\xf0\xc3\xe0_\"ga\xfc\xa8\x89\x92\xe8\xc8>%)cq\x92-g\xb5\rCc\x92j4$E\x9aaZ8\x079\t\x93L\xd7\x1b\xe8}\x1f\x8a\x83 o"
   }
 }
 105
@@ -1471,59 +1521,59 @@
 message: {
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {}
 }
-ref_index: 77
+ref_index: 79
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-247
+243
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/values/01610000"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/values/01610000"
   }
 }
-ref_index: 79
-265
+ref_index: 81
+263
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/values/01610000"
+    missing: "projects/oscar-go-1/databases/test/documents/values/01610000"
     read_time: {
-      seconds: 1723318740
-      nanos: 973109000
+      seconds: 1724185285
+      nanos: 887106000
     }
   }
 }
-ref_index: 79
+ref_index: 81
 40
 kind: RECV
 is_error: true
-ref_index: 79
-213
+ref_index: 81
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-414
+415
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11\x07Fy\xc1\xf1\xdd\x05c\"Y\x00\xb8>\xbb\x0eP\x96ǖ\xcc\xcbe\x1c\xdc\xd8bL\xa0\x97\xbbe\xb0c}T3\xe9\x1f\x9c\xe3~\xe6>\xb6,泋\x85\x0c\xaa\xff\xe3ьP\x03\xe7\xd1\xc8\xdd\n㝆\x12\x9a\x8d\xa6\xd3\xf5~º=<\xd9h\xe2[\x1f\xf70\xe0\x9dr\xbf\xd56\x96\xb9\xb8\xb7\x97\xaf)b\xfc\x9a"
+    transaction: "\x11\xb9V䨆.\xc1\x8a\"Y\x00\xb8>\xbb\x0e\xc4M\xb7\xfdmj\xe5\x91R\xb6\xcfh\xf8\xc6\xe9\xb6\x7f\x90\xa8D\x80S\xb3\x9c\xc0\x9d\xf5\x88\x82\r\x99\x13]\xacV޷\x8a\xef\xea ֍\xa8\xe4\x80Of\x91 \xa2\x8b\xa6\xe0%\x8c\xbdF\x02&\x1a\x95\xfa\xcf\n7\x92S\xc1|5m-\xc65\x03\x8c2lv\xd8J\x18R"
   }
 }
-ref_index: 83
+ref_index: 85
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-960
+998
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents"
+    parent: "projects/oscar-go-1/databases/test/documents"
     structured_query: {
       from: {
         collection_id: "values"
@@ -1536,42 +1586,45 @@
       }
       start_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/61"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/61"
         }
         before: true
       }
       end_at: {
         values: {
-          reference_value: "projects/oscar-432119/databases/test/documents/values/62"
+          reference_value: "projects/oscar-go-1/databases/test/documents/values/62"
         }
       }
+      limit: {
+        value: 1000
+      }
     }
-    transaction: "\x11\x07Fy\xc1\xf1\xdd\x05c\"Y\x00\xb8>\xbb\x0eP\x96ǖ\xcc\xcbe\x1c\xdc\xd8bL\xa0\x97\xbbe\xb0c}T3\xe9\x1f\x9c\xe3~\xe6>\xb6,泋\x85\x0c\xaa\xff\xe3ьP\x03\xe7\xd1\xc8\xdd\n㝆\x12\x9a\x8d\xa6\xd3\xf5~º=<\xd9h\xe2[\x1f\xf70\xe0\x9dr\xbf\xd56\x96\xb9\xb8\xb7\x97\xaf)b\xfc\x9a"
+    transaction: "\x11\xb9V䨆.\xc1\x8a\"Y\x00\xb8>\xbb\x0e\xc4M\xb7\xfdmj\xe5\x91R\xb6\xcfh\xf8\xc6\xe9\xb6\x7f\x90\xa8D\x80S\xb3\x9c\xc0\x9d\xf5\x88\x82\r\x99\x13]\xacV޷\x8a\xef\xea ֍\xa8\xe4\x80Of\x91 \xa2\x8b\xa6\xe0%\x8c\xbdF\x02&\x1a\x95\xfa\xcf\n7\x92S\xc1|5m-\xc65\x03\x8c2lv\xd8J\x18R"
   }
 }
-ref_index: 85
+ref_index: 87
 178
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     read_time: {
-      seconds: 1723318740
-      nanos: 993438000
+      seconds: 1724185285
+      nanos: 887817000
     }
   }
 }
-ref_index: 85
+ref_index: 87
 40
 kind: RECV
 is_error: true
-ref_index: 85
-489
+ref_index: 87
+488
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    transaction: "\x11\x07Fy\xc1\xf1\xdd\x05c\"Y\x00\xb8>\xbb\x0eP\x96ǖ\xcc\xcbe\x1c\xdc\xd8bL\xa0\x97\xbbe\xb0c}T3\xe9\x1f\x9c\xe3~\xe6>\xb6,泋\x85\x0c\xaa\xff\xe3ьP\x03\xe7\xd1\xc8\xdd\n㝆\x12\x9a\x8d\xa6\xd3\xf5~º=<\xd9h\xe2[\x1f\xf70\xe0\x9dr\xbf\xd56\x96\xb9\xb8\xb7\x97\xaf)b\xfc\x9a"
+    database: "projects/oscar-go-1/databases/test"
+    transaction: "\x11\xb9V䨆.\xc1\x8a\"Y\x00\xb8>\xbb\x0e\xc4M\xb7\xfdmj\xe5\x91R\xb6\xcfh\xf8\xc6\xe9\xb6\x7f\x90\xa8D\x80S\xb3\x9c\xc0\x9d\xf5\x88\x82\r\x99\x13]\xacV޷\x8a\xef\xea ֍\xa8\xe4\x80Of\x91 \xa2\x8b\xa6\xe0%\x8c\xbdF\x02&\x1a\x95\xfa\xcf\n7\x92S\xc1|5m-\xc65\x03\x8c2lv\xd8J\x18R"
   }
 }
 182
@@ -1579,9 +1632,9 @@
 message: {
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     commit_time: {
-      seconds: 1723318740
-      nanos: 993438000
+      seconds: 1724185285
+      nanos: 887817000
     }
   }
 }
-ref_index: 89
+ref_index: 91
diff --git a/internal/gcp/firestore/testdata/dbslow.grpcrr.gz b/internal/gcp/firestore/testdata/dbslow.grpcrr.gz
index fcd0715..4e36ac9 100644
--- a/internal/gcp/firestore/testdata/dbslow.grpcrr.gz
+++ b/internal/gcp/firestore/testdata/dbslow.grpcrr.gz
Binary files differ
diff --git a/internal/gcp/firestore/testdata/vectordb.grpcrr b/internal/gcp/firestore/testdata/vectordb.grpcrr
index 58268ef..4aff8a0 100644
--- a/internal/gcp/firestore/testdata/vectordb.grpcrr
+++ b/internal/gcp/firestore/testdata/vectordb.grpcrr
@@ -1,25 +1,25 @@
 RPCReTxt1
-"oscar-432119"
+"oscar-go-1"
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-234
+230
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/c/d"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/c/d"
   }
 }
 ref_index: 1
-252
+250
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/c/d"
+    missing: "projects/oscar-go-1/databases/test/documents/c/d"
     read_time: {
-      seconds: 1723318749
-      nanos: 406455000
+      seconds: 1724187614
+      nanos: 861355000
     }
   }
 }
@@ -28,15 +28,15 @@
 kind: RECV
 is_error: true
 ref_index: 1
-2365
+2361
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
         fields: {
           key: "Embedding"
           value: {
@@ -115,26 +115,26 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
     }
     commit_time: {
-      seconds: 1723318749
-      nanos: 510983000
+      seconds: 1724187615
+      nanos: 144126000
     }
   }
 }
 ref_index: 5
-2370
+2366
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
         fields: {
           key: "Embedding"
           value: {
@@ -213,26 +213,26 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318749
-        nanos: 647678000
+        seconds: 1724187615
+        nanos: 295441000
       }
     }
     commit_time: {
-      seconds: 1723318749
-      nanos: 647678000
+      seconds: 1724187615
+      nanos: 295441000
     }
   }
 }
 ref_index: 7
-2380
+2376
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531616c696173"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531616c696173"
         fields: {
           key: "Embedding"
           value: {
@@ -311,25 +311,25 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318749
-        nanos: 747512000
+        seconds: 1724187615
+        nanos: 426899000
       }
     }
     commit_time: {
-      seconds: 1723318749
-      nanos: 747512000
+      seconds: 1724187615
+      nanos: 426899000
     }
   }
 }
 ref_index: 9
-324
+320
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531616c696173"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531616c696173"
     }
   }
 }
@@ -339,20 +339,20 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {}
     commit_time: {
-      seconds: 1723318749
-      nanos: 876134000
+      seconds: 1724187615
+      nanos: 536139000
     }
   }
 }
 ref_index: 11
-314
+310
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
     }
   }
 }
@@ -362,21 +362,21 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {}
     commit_time: {
-      seconds: 1723318749
-      nanos: 973478000
+      seconds: 1724187615
+      nanos: 644698000
     }
   }
 }
 ref_index: 13
-2370
+2366
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
         fields: {
           key: "Embedding"
           value: {
@@ -455,13 +455,13 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
     }
     commit_time: {
-      seconds: 1723318750
-      nanos: 112480000
+      seconds: 1724187615
+      nanos: 760695000
     }
   }
 }
@@ -469,25 +469,34 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-266
+422
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents/vectorDBs/test"
+    parent: "projects/oscar-go-1/databases/test/documents/vectorDBs/test"
     structured_query: {
       from: {
         collection_id: "vectors"
       }
+      order_by: {
+        field: {
+          field_path: "__name__"
+        }
+        direction: ASCENDING
+      }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
 ref_index: 17
-2359
+2357
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
       fields: {
         key: "Embedding"
         value: {
@@ -557,27 +566,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
     }
     read_time: {
-      seconds: 1723318750
-      nanos: 206655000
+      seconds: 1724187615
+      nanos: 854629000
     }
   }
 }
 ref_index: 17
-2354
+2352
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
       fields: {
         key: "Embedding"
         value: {
@@ -647,17 +656,17 @@
         }
       }
       create_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
       update_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
     }
     read_time: {
-      seconds: 1723318750
-      nanos: 206655000
+      seconds: 1724187615
+      nanos: 854629000
     }
   }
 }
@@ -666,15 +675,15 @@
 kind: RECV
 is_error: true
 ref_index: 17
-2348
+2344
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6531"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6531"
         fields: {
           key: "Embedding"
           value: {
@@ -753,45 +762,45 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 354136000
+        seconds: 1724187615
+        nanos: 965988000
       }
     }
     commit_time: {
-      seconds: 1723318750
-      nanos: 354136000
+      seconds: 1724187615
+      nanos: 965988000
     }
   }
 }
 ref_index: 22
-213
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-395
+404
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11\x1d1%\xa9\xb1\xb9VC\"Y\x00\xb8>\xbb\x0e\nn|'\x1d\xa22|\xdf89QX?\x07\xc0G\xfa\xdc\r\x07$\xfc\xd9\xca\xd88N\xa8\x93\x19w\xfa\xe5\x18\x95\x182|\x91\x10\xcb(|3\t\xfcE\xa0\x18\xa4\xe2\x99Y\xb0\r\xca\x1d\xacыg\x8b\xa3@\xb7F\n9\xbdd6_\\)\x08>\x1aN\xcdIП\xa2"
+    transaction: "\x11c\x18;\x8cH\xb5\xee\x92\"Y\x00\xb8>\xbb\x0eq=6-\xbf7\xd4) 1\x92\xe7\xd4|w\xf3,?\x03\x9a]\x17;\xf7'\n\xa29\xf2}k\x9a\n\x82Z\x01s\xa5\xe3\xb03=\xe9\xb7~\xf8\xec\xed\xb0\xe7ͅ\xa2\xea\x84\xc5t\xf5R\x02\xfd\x9e\x02\xb5\x87\xb2\xd9\xd9ҡ\nšALɭ\xb5\x1d`\xf2\x89\xeam"
   }
 }
 ref_index: 24
-12805
+12792
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6531"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6531"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
         fields: {
           key: "Embedding"
           value: {
@@ -864,7 +873,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
         fields: {
           key: "Embedding"
           value: {
@@ -937,7 +946,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534616c696173"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534616c696173"
         fields: {
           key: "Embedding"
           value: {
@@ -1009,11 +1018,11 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534616c696173"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534616c696173"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/69676e6f7265"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/69676e6f7265"
         fields: {
           key: "Embedding"
           value: {
@@ -1050,7 +1059,7 @@
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676533"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676533"
         fields: {
           key: "Embedding"
           value: {
@@ -1122,14 +1131,14 @@
       }
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676533"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676533"
     }
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
     }
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
         fields: {
           key: "Embedding"
           value: {
@@ -1200,7 +1209,7 @@
         }
       }
     }
-    transaction: "\x11\x1d1%\xa9\xb1\xb9VC\"Y\x00\xb8>\xbb\x0e\nn|'\x1d\xa22|\xdf89QX?\x07\xc0G\xfa\xdc\r\x07$\xfc\xd9\xca\xd88N\xa8\x93\x19w\xfa\xe5\x18\x95\x182|\x91\x10\xcb(|3\t\xfcE\xa0\x18\xa4\xe2\x99Y\xb0\r\xca\x1d\xacыg\x8b\xa3@\xb7F\n9\xbdd6_\\)\x08>\x1aN\xcdIП\xa2"
+    transaction: "\x11c\x18;\x8cH\xb5\xee\x92\"Y\x00\xb8>\xbb\x0eq=6-\xbf7\xd4) 1\x92\xe7\xd4|w\xf3,?\x03\x9a]\x17;\xf7'\n\xa29\xf2}k\x9a\n\x82Z\x01s\xa5\xe3\xb03=\xe9\xb7~\xf8\xec\xed\xb0\xe7ͅ\xa2\xea\x84\xc5t\xf5R\x02\xfd\x9e\x02\xb5\x87\xb2\xd9\xd9ҡ\nšALɭ\xb5\x1d`\xf2\x89\xeam"
   }
 }
 837
@@ -1210,70 +1219,70 @@
     write_results: {}
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     write_results: {}
     write_results: {}
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     write_results: {}
     write_results: {}
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     commit_time: {
-      seconds: 1723318750
-      nanos: 578886000
+      seconds: 1724187616
+      nanos: 148735000
     }
   }
 }
 ref_index: 26
-213
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-406
+379
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11/\x1a\xefi\xb2\\T8\"Y\x00\xd4u\xc8\xcd~o\x07\xd0)z\xe2Q\x9a\x87\xc4\x11\xcb\xc1\x8d>&\xdbj\xa0\x90t\xad\xf3k\x85\xe4\xb8ف\xc7\x1atͤ}uxz#\x1bS\x94\xcbL\xa6\xe5n\xf8\xa8PyA\xad \x00\xc7\x1d&\x1b\x8bc\xa8\x0e\xb2\xe6a\xb4c\xd7\u0083\xc9\xf9ä\xd6\x0c\x00{\x0e\x06`r"
+    transaction: "\x11̍\x9a˟ʌ\xe8\"Y\x00\xb8>\xbb\x0e\x9e\xdc+\x93*\xe9\xc8_\xce8\xb67\xa0s\x1c\x0e:Zo\xb0ɻ\x97Tᗢ\x1f\x0bK\x19&\xe3G{6qy&\x11\x9f\x92\xd0\xc6s\x18\xbe\x85\xe0Ul`\xc1\xcdj\xe6?vA\xa1U\"8\xf2\x13\x96&;]\xa2\tIF\x1f\x9b~*\xf5Pb\xfa\xf0a\xf9"
   }
 }
 ref_index: 28
-2638
+2607
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
       update: {
-        name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
+        name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
         fields: {
           key: "Embedding"
           value: {
@@ -1344,7 +1353,7 @@
         }
       }
     }
-    transaction: "\x11/\x1a\xefi\xb2\\T8\"Y\x00\xd4u\xc8\xcd~o\x07\xd0)z\xe2Q\x9a\x87\xc4\x11\xcb\xc1\x8d>&\xdbj\xa0\x90t\xad\xf3k\x85\xe4\xb8ف\xc7\x1atͤ}uxz#\x1bS\x94\xcbL\xa6\xe5n\xf8\xa8PyA\xad \x00\xc7\x1d&\x1b\x8bc\xa8\x0e\xb2\xe6a\xb4c\xd7\u0083\xc9\xf9ä\xd6\x0c\x00{\x0e\x06`r"
+    transaction: "\x11̍\x9a˟ʌ\xe8\"Y\x00\xb8>\xbb\x0e\x9e\xdc+\x93*\xe9\xc8_\xce8\xb67\xa0s\x1c\x0e:Zo\xb0ɻ\x97Tᗢ\x1f\x0bK\x19&\xe3G{6qy&\x11\x9f\x92\xd0\xc6s\x18\xbe\x85\xe0Ul`\xc1\xcdj\xe6?vA\xa1U\"8\xf2\x13\x96&;]\xa2\tIF\x1f\x9b~*\xf5Pb\xfa\xf0a\xf9"
   }
 }
 291
@@ -1353,25 +1362,25 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {
       update_time: {
-        seconds: 1723318750
-        nanos: 820077000
+        seconds: 1724187616
+        nanos: 325704000
       }
     }
     commit_time: {
-      seconds: 1723318750
-      nanos: 820077000
+      seconds: 1724187616
+      nanos: 325704000
     }
   }
 }
 ref_index: 30
-312
+308
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
     writes: {
-      delete: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
+      delete: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
     }
   }
 }
@@ -1381,35 +1390,35 @@
   [type.googleapis.com/google.firestore.v1.CommitResponse]: {
     write_results: {}
     commit_time: {
-      seconds: 1723318750
-      nanos: 962987000
+      seconds: 1724187616
+      nanos: 432822000
     }
   }
 }
 ref_index: 32
-213
+211
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/BeginTransaction"
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionRequest]: {
-    database: "projects/oscar-432119/databases/test"
+    database: "projects/oscar-go-1/databases/test"
   }
 }
-400
+393
 kind: RESPONSE
 message: {
   [type.googleapis.com/google.firestore.v1.BeginTransactionResponse]: {
-    transaction: "\x11t[\x0b\xf4reZx\"Y\x00\xb8>\xbb\x0e\xa5.\xb28\xa1:\x93zkɆ'\xcb\xe0\xd7L\xa6ֶ\x97*\x0b\xadq]\x17\x01\xfcH`\xb7g\n\xe4d\x05\xd5\x06\xc0Nj\x84e\xfa\xab\xbf\x1cQ\x98-\x80\x00f\x04\xf9D9K\xcd\rE'4\x8b\x9ev\xf7\xfb\xae\xc9\xde\xcf\xd3~sU-\xd7\xf4<\x19\x96\x07\xd3"
+    transaction: "\x11\xbb6\rj\x11%\x838\"Y\x00\xb8>\xbb\x0eKɖJSb\x90*\xed\xef\x1f-t\xf6\x9aD\xb3K|C\xc8gs\x9e\xbfj\xb8b/\x18D,\x90\xe8<\xb8\x9f\x88\xa2|z\xb7\x910\xd4\xc6\x14\xf0\x1c\x9f\xb9\x159\xbb\xc60\xe0ym\xa3\xf6\x07\x0fF/nF\xf5\xd0\xd6\x1d[\x86\xc8[\x08BNȿߦ\x94L"
   }
 }
 ref_index: 34
-475
+466
 kind: REQUEST
 method: "/google.firestore.v1.Firestore/Commit"
 message: {
   [type.googleapis.com/google.firestore.v1.CommitRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    transaction: "\x11t[\x0b\xf4reZx\"Y\x00\xb8>\xbb\x0e\xa5.\xb28\xa1:\x93zkɆ'\xcb\xe0\xd7L\xa6ֶ\x97*\x0b\xadq]\x17\x01\xfcH`\xb7g\n\xe4d\x05\xd5\x06\xc0Nj\x84e\xfa\xab\xbf\x1cQ\x98-\x80\x00f\x04\xf9D9K\xcd\rE'4\x8b\x9ev\xf7\xfb\xae\xc9\xde\xcf\xd3~sU-\xd7\xf4<\x19\x96\x07\xd3"
+    database: "projects/oscar-go-1/databases/test"
+    transaction: "\x11\xbb6\rj\x11%\x838\"Y\x00\xb8>\xbb\x0eKɖJSb\x90*\xed\xef\x1f-t\xf6\x9aD\xb3K|C\xc8gs\x9e\xbfj\xb8b/\x18D,\x90\xe8<\xb8\x9f\x88\xa2|z\xb7\x910\xd4\xc6\x14\xf0\x1c\x9f\xb9\x159\xbb\xc60\xe0ym\xa3\xf6\x07\x0fF/nF\xf5\xd0\xd6\x1d[\x86\xc8[\x08BNȿߦ\x94L"
   }
 }
 105
@@ -1421,23 +1430,23 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-267
+263
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
   }
 }
 ref_index: 38
-285
+283
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
+    missing: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6535"
     read_time: {
-      seconds: 1723318751
-      nanos: 236139000
+      seconds: 1724187616
+      nanos: 432822000
     }
   }
 }
@@ -1449,25 +1458,34 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-266
+422
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents/vectorDBs/test"
+    parent: "projects/oscar-go-1/databases/test/documents/vectorDBs/test"
     structured_query: {
       from: {
         collection_id: "vectors"
       }
+      order_by: {
+        field: {
+          field_path: "__name__"
+        }
+        direction: ASCENDING
+      }
+      limit: {
+        value: 1000
+      }
     }
   }
 }
 ref_index: 42
-2337
+2335
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
       fields: {
         key: "Embedding"
         value: {
@@ -1537,27 +1555,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
 ref_index: 42
-2334
+2332
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
       fields: {
         key: "Embedding"
         value: {
@@ -1627,27 +1645,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
 ref_index: 42
-1278
+1276
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/69676e6f7265"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/69676e6f7265"
       fields: {
         key: "Embedding"
         value: {
@@ -1681,27 +1699,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
 ref_index: 42
-2359
+2357
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
       fields: {
         key: "Embedding"
         value: {
@@ -1771,27 +1789,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
 ref_index: 42
-2354
+2352
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
       fields: {
         key: "Embedding"
         value: {
@@ -1861,27 +1879,27 @@
         }
       }
       create_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
       update_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
 ref_index: 42
-2358
+2356
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
       fields: {
         key: "Embedding"
         value: {
@@ -1951,17 +1969,17 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 325104000
+      seconds: 1724187616
+      nanos: 874411000
     }
   }
 }
@@ -1973,21 +1991,21 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-267
+263
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
   }
 }
 ref_index: 51
-2343
+2341
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
     found: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
       fields: {
         key: "Embedding"
         value: {
@@ -2057,17 +2075,17 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 376795000
+      seconds: 1724187616
+      nanos: 967304000
     }
   }
 }
@@ -2079,11 +2097,11 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-2284
+2282
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents/vectorDBs/test"
+    parent: "projects/oscar-go-1/databases/test/documents/vectorDBs/test"
     structured_query: {
       from: {
         collection_id: "vectors"
@@ -2166,12 +2184,12 @@
   }
 }
 ref_index: 55
-2334
+2331
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
       fields: {
         key: "Embedding"
         value: {
@@ -2241,27 +2259,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 486798000
+      seconds: 1724187617
+      nanos: 54239000
     }
   }
 }
 ref_index: 55
-2337
+2334
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
       fields: {
         key: "Embedding"
         value: {
@@ -2331,27 +2349,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 486798000
+      seconds: 1724187617
+      nanos: 54239000
     }
   }
 }
 ref_index: 55
-2359
+2356
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
       fields: {
         key: "Embedding"
         value: {
@@ -2421,27 +2439,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 486798000
+      seconds: 1724187617
+      nanos: 54239000
     }
   }
 }
 ref_index: 55
-2354
+2351
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676532"
       fields: {
         key: "Embedding"
         value: {
@@ -2511,27 +2529,27 @@
         }
       }
       create_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
       update_time: {
-        seconds: 1723318749
-        nanos: 510983000
+        seconds: 1724187615
+        nanos: 144126000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 486798000
+      seconds: 1724187617
+      nanos: 54239000
     }
   }
 }
 ref_index: 55
-2358
+2355
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676534"
       fields: {
         key: "Embedding"
         value: {
@@ -2601,17 +2619,17 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 486798000
+      seconds: 1724187617
+      nanos: 54239000
     }
   }
 }
@@ -2623,23 +2641,23 @@
 79
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/BatchGetDocuments"
-235
+231
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsRequest]: {
-    database: "projects/oscar-432119/databases/test"
-    documents: "projects/oscar-432119/databases/test/documents/c/d"
+    database: "projects/oscar-go-1/databases/test"
+    documents: "projects/oscar-go-1/databases/test/documents/c/d"
   }
 }
 ref_index: 63
-253
+251
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.BatchGetDocumentsResponse]: {
-    missing: "projects/oscar-432119/databases/test/documents/c/d"
+    missing: "projects/oscar-go-1/databases/test/documents/c/d"
     read_time: {
-      seconds: 1723318751
-      nanos: 376795000
+      seconds: 1724187616
+      nanos: 432822000
     }
   }
 }
@@ -2651,11 +2669,11 @@
 70
 kind: CREATE_STREAM
 method: "/google.firestore.v1.Firestore/RunQuery"
-2284
+2282
 kind: SEND
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryRequest]: {
-    parent: "projects/oscar-432119/databases/test/documents/vectorDBs/test"
+    parent: "projects/oscar-go-1/databases/test/documents/vectorDBs/test"
     structured_query: {
       from: {
         collection_id: "vectors"
@@ -2738,12 +2756,12 @@
   }
 }
 ref_index: 67
-2334
+2332
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6534"
       fields: {
         key: "Embedding"
         value: {
@@ -2813,27 +2831,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 884641000
+      seconds: 1724187617
+      nanos: 445999000
     }
   }
 }
 ref_index: 67
-2337
+2335
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6170706c6533"
       fields: {
         key: "Embedding"
         value: {
@@ -2903,27 +2921,27 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 578886000
+        seconds: 1724187616
+        nanos: 148735000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 884641000
+      seconds: 1724187617
+      nanos: 445999000
     }
   }
 }
 ref_index: 67
-2359
+2357
 kind: RECV
 message: {
   [type.googleapis.com/google.firestore.v1.RunQueryResponse]: {
     document: {
-      name: "projects/oscar-432119/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
+      name: "projects/oscar-go-1/databases/test/documents/vectorDBs/test/vectors/6f72616e676531"
       fields: {
         key: "Embedding"
         value: {
@@ -2993,17 +3011,17 @@
         }
       }
       create_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
       update_time: {
-        seconds: 1723318750
-        nanos: 112480000
+        seconds: 1724187615
+        nanos: 760695000
       }
     }
     read_time: {
-      seconds: 1723318751
-      nanos: 884641000
+      seconds: 1724187617
+      nanos: 445999000
     }
   }
 }
diff --git a/internal/gcp/firestore/testdata/vectordbslow.grpcrr.gz b/internal/gcp/firestore/testdata/vectordbslow.grpcrr.gz
index 247168d..d326e1f 100644
--- a/internal/gcp/firestore/testdata/vectordbslow.grpcrr.gz
+++ b/internal/gcp/firestore/testdata/vectordbslow.grpcrr.gz
Binary files differ
diff --git a/internal/gcp/firestore/vectordb.go b/internal/gcp/firestore/vectordb.go
index 6f825b0..7c01c29 100644
--- a/internal/gcp/firestore/vectordb.go
+++ b/internal/gcp/firestore/vectordb.go
@@ -96,37 +96,38 @@
 // All implements [storage.VectorDB.All].
 func (db *VectorDB) All() iter.Seq2[string, func() llm.Vector] {
 	return func(yield func(string, func() llm.Vector) bool) {
-		iter := db.coll.Documents(context.Background())
-		defer func() { // not defer iter.Stop(); iter can change
-			iter.Stop()
-		}()
-		var last string
+		next := func(start string) *firestore.DocumentIterator {
+			// OrderBy is required for StartAt to work.
+			query := db.coll.OrderBy(firestore.DocumentID, firestore.Asc).Limit(docLimit)
+			if start != "" {
+				query = query.StartAt(start)
+			}
+			return query.Documents(context.Background())
+		}
+		last := ""
 		for {
-			ds, err := iter.Next()
-			if err == iterator.Done {
-				return
-			}
-			if grpcerrors.IsUnavailable(err) && last != "" {
-				// Cope with 60-second Firestore timeout by restarting after the last ID we observed.
-				// See longer comment in [fstore.scan].
-				db.fs.slog.Info("firestore VectorDB scan error; restarting", "last", string(decodeKey(last)), "err", err)
-				iter.Stop()
-				iter = db.coll.OrderBy(firestore.DocumentID, firestore.Asc).StartAt(keyAfter(last)).Documents(context.Background())
-				last = ""
-				continue
-			}
+			page := next(last)
+			docs, err := page.GetAll()
 			if err != nil {
+				// Unreachable except for bad DB or potential 60 seconds timeout
+				// (see longer comment in [fstore.scan]).
+				// The timeout should not happen now with Query.Limit(docLimit).
 				db.fs.Panic("firestore VectorDB All", "err", err)
 			}
-			id := db.decodeVectorID(ds.Ref.ID)
-			var doc vectorDoc
-			if err := ds.DataTo(&doc); err != nil {
-				db.fs.Panic("firestore VectorDB All", "id", id, "err", err)
+			for _, ds := range docs {
+				id := db.decodeVectorID(ds.Ref.ID)
+				var doc vectorDoc
+				if err := ds.DataTo(&doc); err != nil {
+					db.fs.Panic("firestore VectorDB All", "id", id, "err", err)
+				}
+				if !yield(id, func() llm.Vector { return llm.Vector(doc.Embedding) }) {
+					return
+				}
 			}
-			last = ds.Ref.ID
-			if !yield(id, func() llm.Vector { return llm.Vector(doc.Embedding) }) {
+			if len(docs) < docLimit { // no more things to fetch
 				return
 			}
+			last = keyAfter(docs[len(docs)-1].Ref.ID)
 		}
 	}
 }