Addendum of HDFS-10722 to include HDFS-7964 logic.
(cherry picked from commit 4a8e6dc02fb1d0dc89c3981b444575494511444a) (cherry picked from commit 3b2554f3b0f686a66e3df20b7c381babb9bc74d3) (cherry picked from commit c2bb9bf00c4a32644f96c673078a812087ef3c46)
This commit is contained in:
parent
7900b1e803
commit
91640a0170
@ -591,8 +591,12 @@ public void testBatchedSyncWithClosedLogs() throws Exception {
|
|||||||
|
|
||||||
// Log an edit from thread A
|
// Log an edit from thread A
|
||||||
doLogEdit(threadA, editLog, "thread-a 1");
|
doLogEdit(threadA, editLog, "thread-a 1");
|
||||||
|
// async log is doing batched syncs in background. logSync just ensures
|
||||||
|
// the edit is durable, so the txid may increase prior to sync
|
||||||
|
if (!useAsyncEditLog) {
|
||||||
assertEquals("logging edit without syncing should do not affect txid",
|
assertEquals("logging edit without syncing should do not affect txid",
|
||||||
1, editLog.getSyncTxId());
|
1, editLog.getSyncTxId());
|
||||||
|
}
|
||||||
// logSyncAll in Thread B
|
// logSyncAll in Thread B
|
||||||
doCallLogSyncAll(threadB, editLog);
|
doCallLogSyncAll(threadB, editLog);
|
||||||
assertEquals("logSyncAll should sync thread A's transaction",
|
assertEquals("logSyncAll should sync thread A's transaction",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user