Skip to content

Commit e96a2e6

Browse files
Google APIscopybara-github
authored andcommitted
feat: Publish message definitions for new Cloud Datastore migration logging steps.
PiperOrigin-RevId: 383927106
1 parent 1eade81 commit e96a2e6

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

google/datastore/admin/v1/migration.proto

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,45 @@ message MigrationStateEvent {
3636
// Datastore to Cloud Firestore in Datastore
3737
// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
3838
message MigrationProgressEvent {
39+
// Details for the `PREPARE` step.
40+
message PrepareStepDetails {
41+
// The concurrency mode this database will use when it reaches the
42+
// `REDIRECT_WRITES` step.
43+
ConcurrencyMode concurrency_mode = 1;
44+
}
45+
46+
// Details for the `REDIRECT_WRITES` step.
47+
message RedirectWritesStepDetails {
48+
// Ths concurrency mode for this database.
49+
ConcurrencyMode concurrency_mode = 1;
50+
}
51+
52+
// Concurrency modes for transactions in Cloud Firestore.
53+
enum ConcurrencyMode {
54+
// Unspecified.
55+
CONCURRENCY_MODE_UNSPECIFIED = 0;
56+
57+
// Pessimistic concurrency.
58+
PESSIMISTIC = 1;
59+
60+
// Optimistic concurrency.
61+
OPTIMISTIC = 2;
62+
}
63+
3964
// The step that is starting.
4065
//
4166
// An event with step set to `START` indicates that the migration
4267
// has been reverted back to the initial pre-migration state.
4368
MigrationStep step = 1;
69+
70+
// Details about this step.
71+
oneof step_details {
72+
// Details for the `PREPARE` step.
73+
PrepareStepDetails prepare_step_details = 2;
74+
75+
// Details for the `REDIRECT_WRITES` step.
76+
RedirectWritesStepDetails redirect_writes_step_details = 3;
77+
}
4478
}
4579

4680
// States for a migration.
@@ -63,9 +97,15 @@ enum MigrationStep {
6397
// Unspecified.
6498
MIGRATION_STEP_UNSPECIFIED = 0;
6599

100+
// Pre-migration: the database is prepared for migration.
101+
PREPARE = 6;
102+
66103
// Start of migration.
67104
START = 1;
68105

106+
// Writes are applied synchronously to at least one replica.
107+
APPLY_WRITES_SYNCHRONOUSLY = 7;
108+
69109
// Data is copied to Cloud Firestore and then verified to match the data in
70110
// Cloud Datastore.
71111
COPY_AND_VERIFY = 2;

0 commit comments

Comments
 (0)