Skip to content

Commit 454ad5e

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarifications for DatastoreFirestoreMigraitonMetadata
feat: new enum value `OPTIMISTIC_WITH_ENTITY_GROUPS` for `ConcurrencyMode` PiperOrigin-RevId: 452220654
1 parent 4e0282f commit 454ad5e

4 files changed

Lines changed: 29 additions & 28 deletions

File tree

google/datastore/admin/v1/datastore_admin.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -481,7 +481,7 @@ message IndexOperationMetadata {
481481
// design pattern.
482482
//
483483
// This singleton resource can be accessed at:
484-
// `projects/{project_id}/datastore-firestore-migration`
484+
// "projects/{project_id}/operations/datastore-firestore-migration"
485485
message DatastoreFirestoreMigrationMetadata {
486486
// The current state of migration from Cloud Datastore to Cloud Firestore in
487487
// Datastore mode.

google/datastore/admin/v1/datastore_v1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Cloud Datastore API
55

66
apis:
77
- name: google.datastore.admin.v1.DatastoreAdmin
8+
- name: google.longrunning.Operations
89

910
types:
1011
- name: google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata

google/datastore/admin/v1/index.proto

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@ syntax = "proto3";
1717
package google.datastore.admin.v1;
1818

1919
import "google/api/field_behavior.proto";
20-
import "google/api/annotations.proto";
2120

2221
option csharp_namespace = "Google.Cloud.Datastore.Admin.V1";
2322
option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin";
@@ -29,15 +28,6 @@ option ruby_package = "Google::Cloud::Datastore::Admin::V1";
2928

3029
// Datastore composite index definition.
3130
message Index {
32-
// A property of an index.
33-
message IndexedProperty {
34-
// Required. The property name to index.
35-
string name = 1 [(google.api.field_behavior) = REQUIRED];
36-
37-
// Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
38-
Direction direction = 2 [(google.api.field_behavior) = REQUIRED];
39-
}
40-
4131
// For an ordered index, specifies whether each of the entity's ancestors
4232
// will be included.
4333
enum AncestorMode {
@@ -65,6 +55,15 @@ message Index {
6555
DESCENDING = 2;
6656
}
6757

58+
// A property of an index.
59+
message IndexedProperty {
60+
// Required. The property name to index.
61+
string name = 1 [(google.api.field_behavior) = REQUIRED];
62+
63+
// Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
64+
Direction direction = 2 [(google.api.field_behavior) = REQUIRED];
65+
}
66+
6867
// The possible set of states of an index.
6968
enum State {
7069
// The state is unspecified.

google/datastore/admin/v1/migration.proto

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@ syntax = "proto3";
1616

1717
package google.datastore.admin.v1;
1818

19-
import "google/api/annotations.proto";
20-
2119
option csharp_namespace = "Google.Cloud.Datastore.Admin.V1";
2220
option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin";
2321
option java_multiple_files = true;
@@ -38,6 +36,21 @@ message MigrationStateEvent {
3836
// Datastore to Cloud Firestore in Datastore
3937
// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
4038
message MigrationProgressEvent {
39+
// Concurrency modes for transactions in Cloud Firestore.
40+
enum ConcurrencyMode {
41+
// Unspecified.
42+
CONCURRENCY_MODE_UNSPECIFIED = 0;
43+
44+
// Pessimistic concurrency.
45+
PESSIMISTIC = 1;
46+
47+
// Optimistic concurrency.
48+
OPTIMISTIC = 2;
49+
50+
// Optimistic concurrency with entity groups.
51+
OPTIMISTIC_WITH_ENTITY_GROUPS = 3;
52+
}
53+
4154
// Details for the `PREPARE` step.
4255
message PrepareStepDetails {
4356
// The concurrency mode this database will use when it reaches the
@@ -51,18 +64,6 @@ message MigrationProgressEvent {
5164
ConcurrencyMode concurrency_mode = 1;
5265
}
5366

54-
// Concurrency modes for transactions in Cloud Firestore.
55-
enum ConcurrencyMode {
56-
// Unspecified.
57-
CONCURRENCY_MODE_UNSPECIFIED = 0;
58-
59-
// Pessimistic concurrency.
60-
PESSIMISTIC = 1;
61-
62-
// Optimistic concurrency.
63-
OPTIMISTIC = 2;
64-
}
65-
6667
// The step that is starting.
6768
//
6869
// An event with step set to `START` indicates that the migration

0 commit comments

Comments
 (0)