mirror of
https://github.com/google/nomulus
synced 2026-01-08 23:23:32 +00:00
Fix code to always set HistoryEntry modification time using txn time
Since HistoryEntry always represents a read-only log of mutation to a core resource, that mutation should always happen in a transaction, and the HistoryEntry should be saved in that transaction. As such, it's always more accurate to use ofy().getTransactionTime() for the modificationTime of the HistoryEntry rather than just DateTime.now(UTC). In addition, having these be the exact same timestamp makes it possible to align HistoryEntries with commit log manifests using modificationTime = transactionTime, which is useful for recovery and analysis purposes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170136957
This commit is contained in:
@@ -104,7 +104,7 @@ public class HistoryEntry extends ImmutableObject implements Buildable {
|
||||
/** The actual EPP xml of the command, stored as bytes to be agnostic of encoding. */
|
||||
byte[] xmlBytes;
|
||||
|
||||
/** The time the command occurred. */
|
||||
/** The time the command occurred, represented by the ofy transaction time.*/
|
||||
@Index
|
||||
DateTime modificationTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user