mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 03:30:46 +02:00
Ignore read-only mode in SQL->DS replication process (#1432)
* Ignore read-only mode in SQL->DS replication process We need to be able to save indices and save data about the replication even when we're in read-only mode.
This commit is contained in:
parent
97a87687b2
commit
e4fb083f8a
2 changed files with 5 additions and 5 deletions
|
@ -228,10 +228,8 @@ public abstract class EppResource extends BackupGroupRoot implements Buildable {
|
|||
|
||||
/** Used when replaying from SQL to DS to populate the Datastore indexes. */
|
||||
protected void saveIndexesToDatastore() {
|
||||
ofyTm()
|
||||
.putAll(
|
||||
ForeignKeyIndex.create(this, getDeletionTime()),
|
||||
EppResourceIndex.create(Key.create(this)));
|
||||
ofyTm().putIgnoringReadOnly(ForeignKeyIndex.create(this, getDeletionTime()));
|
||||
ofyTm().putIgnoringReadOnly(EppResourceIndex.create(Key.create(this)));
|
||||
}
|
||||
|
||||
/** EppResources that are loaded via foreign keys should implement this marker interface. */
|
||||
|
|
|
@ -148,7 +148,9 @@ public class ReplicateToDatastoreAction implements Runnable {
|
|||
|
||||
// Write the updated last transaction id to Datastore as part of this Datastore
|
||||
// transaction.
|
||||
auditedOfy().save().entity(lastSqlTxn.cloneWithNewTransactionId(nextTxnId));
|
||||
auditedOfy()
|
||||
.saveIgnoringReadOnly()
|
||||
.entity(lastSqlTxn.cloneWithNewTransactionId(nextTxnId));
|
||||
logger.atInfo().log(
|
||||
"Finished applying single transaction Cloud SQL -> Cloud Datastore.");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue