firestore: retry reads that fail with contention
PiperOrigin-RevId: 287250665
This commit is contained in:
parent
fd3091fbe9
commit
2c28f646ca
|
|
@ -40,20 +40,12 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1";
|
|||
|
||||
// The Cloud Firestore service.
|
||||
//
|
||||
// This service exposes several types of comparable timestamps:
|
||||
//
|
||||
// * `create_time` - The time at which a document was created. Changes only
|
||||
// when a document is deleted, then re-created. Increases in a strict
|
||||
// monotonic fashion.
|
||||
// * `update_time` - The time at which a document was last updated. Changes
|
||||
// every time a document is modified. Does not change when a write results
|
||||
// in no modifications. Increases in a strict monotonic fashion.
|
||||
// * `read_time` - The time at which a particular state was observed. Used
|
||||
// to denote a consistent snapshot of the database or the time at which a
|
||||
// Document was observed to not exist.
|
||||
// * `commit_time` - The time at which the writes in a transaction were
|
||||
// committed. Any read with an equal or greater `read_time` is guaranteed
|
||||
// to see the effects of the transaction.
|
||||
// Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
|
||||
// document database that simplifies storing, syncing, and querying data for
|
||||
// your mobile, web, and IoT apps at global scale. Its client libraries provide
|
||||
// live synchronization and offline support, while its security features and
|
||||
// integrations with Firebase and Google Cloud Platform (GCP) accelerate
|
||||
// building truly serverless apps.
|
||||
service Firestore {
|
||||
option (google.api.default_host) = "firestore.googleapis.com";
|
||||
option (google.api.oauth_scopes) =
|
||||
|
|
@ -425,7 +417,8 @@ message CommitResponse {
|
|||
// request.
|
||||
repeated WriteResult write_results = 1;
|
||||
|
||||
// The time at which the commit occurred.
|
||||
// The time at which the commit occurred. Any read with an equal or greater
|
||||
// `read_time` is guaranteed to see the effects of the commit.
|
||||
google.protobuf.Timestamp commit_time = 2;
|
||||
}
|
||||
|
||||
|
|
@ -566,7 +559,8 @@ message WriteResponse {
|
|||
// request.
|
||||
repeated WriteResult write_results = 3;
|
||||
|
||||
// The time at which the commit occurred.
|
||||
// The time at which the commit occurred. Any read with an equal or greater
|
||||
// `read_time` is guaranteed to see the effects of the write.
|
||||
google.protobuf.Timestamp commit_time = 4;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
"maxBackoff": "60s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": [
|
||||
"ABORTED",
|
||||
"UNAVAILABLE",
|
||||
"INTERNAL",
|
||||
"DEADLINE_EXCEEDED"
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
"maxBackoff": "60s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": [
|
||||
"ABORTED",
|
||||
"UNAVAILABLE",
|
||||
"INTERNAL",
|
||||
"DEADLINE_EXCEEDED"
|
||||
|
|
@ -104,6 +106,7 @@
|
|||
"maxBackoff": "60s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": [
|
||||
"ABORTED",
|
||||
"UNAVAILABLE",
|
||||
"INTERNAL",
|
||||
"DEADLINE_EXCEEDED"
|
||||
|
|
|
|||
|
|
@ -155,18 +155,6 @@ message StructuredQuery {
|
|||
Direction direction = 2;
|
||||
}
|
||||
|
||||
// A sort direction.
|
||||
enum Direction {
|
||||
// Unspecified.
|
||||
DIRECTION_UNSPECIFIED = 0;
|
||||
|
||||
// Ascending.
|
||||
ASCENDING = 1;
|
||||
|
||||
// Descending.
|
||||
DESCENDING = 2;
|
||||
}
|
||||
|
||||
// A reference to a field, such as `max(messages.time) as max_time`.
|
||||
message FieldReference {
|
||||
string field_path = 2;
|
||||
|
|
@ -181,6 +169,18 @@ message StructuredQuery {
|
|||
repeated FieldReference fields = 2;
|
||||
}
|
||||
|
||||
// A sort direction.
|
||||
enum Direction {
|
||||
// Unspecified.
|
||||
DIRECTION_UNSPECIFIED = 0;
|
||||
|
||||
// Ascending.
|
||||
ASCENDING = 1;
|
||||
|
||||
// Descending.
|
||||
DESCENDING = 2;
|
||||
}
|
||||
|
||||
// The projection to return.
|
||||
Projection select = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,13 @@ message Write {
|
|||
// The field paths in this mask must not contain a reserved field name.
|
||||
DocumentMask update_mask = 3;
|
||||
|
||||
// The transforms to perform after update.
|
||||
//
|
||||
// This field can be set only when the operation is `update`. If present, this
|
||||
// write is equivalent to performing `update` and `transform` to the same
|
||||
// document atomically and in order.
|
||||
repeated DocumentTransform.FieldTransform update_transforms = 7;
|
||||
|
||||
// An optional precondition on the document.
|
||||
//
|
||||
// The write will fail if this is set and not met by the target document.
|
||||
|
|
|
|||
Loading…
Reference in New Issue