mirror of
https://github.com/google/nomulus.git
synced 2025-08-12 04:29:39 +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
1764ae0b3f
commit
8393c75929
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
|
* Converts the given {@link ImmutableObject} to a raw Datastore entity and write it to an {@link
|
||||||
* {@link OutputStream} in delimited protocol buffer format.
|
* OutputStream} in delimited protocol buffer format.
|
||||||
*/
|
*/
|
||||||
static void serializeEntity(ImmutableObject entity, OutputStream stream) throws IOException {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
auditedOfy()
|
auditedOfy()
|
||||||
.saveWithoutBackup()
|
.saveIgnoringReadOnly()
|
||||||
.entities(
|
.entities(
|
||||||
checkpoint, CommitLogCheckpointRoot.create(checkpoint.getCheckpointTime()));
|
checkpoint, CommitLogCheckpointRoot.create(checkpoint.getCheckpointTime()));
|
||||||
// Enqueue a diff task between previous and current checkpoints.
|
// Enqueue a diff task between previous and current checkpoints.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue