mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 02:06:00 +02:00
Ignore read-only mode when running commit logs / backups (#1424)
We need to be able to continue running the backup and async replay code while the database is in read-only mode
This commit is contained in:
parent
09271977c3
commit
9172093ccd
2 changed files with 5 additions and 4 deletions
|
@ -41,11 +41,12 @@ public class BackupUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the given {@link ImmutableObject} to a raw Datastore entity and write it to an
|
||||
* {@link OutputStream} in delimited protocol buffer format.
|
||||
* Converts the given {@link ImmutableObject} to a raw Datastore entity and write it to an {@link
|
||||
* OutputStream} in delimited protocol buffer format.
|
||||
*/
|
||||
static void serializeEntity(ImmutableObject entity, OutputStream stream) throws IOException {
|
||||
EntityTranslator.convertToPb(auditedOfy().save().toEntity(entity)).writeDelimitedTo(stream);
|
||||
EntityTranslator.convertToPb(auditedOfy().saveIgnoringReadOnly().toEntity(entity))
|
||||
.writeDelimitedTo(stream);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ public final class CommitLogCheckpointAction implements Runnable {
|
|||
return;
|
||||
}
|
||||
auditedOfy()
|
||||
.saveWithoutBackup()
|
||||
.saveIgnoringReadOnly()
|
||||
.entities(
|
||||
checkpoint, CommitLogCheckpointRoot.create(checkpoint.getCheckpointTime()));
|
||||
// Enqueue a diff task between previous and current checkpoints.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue