Remove Resync eof sanity check from smgr_ao.c as well.
@@ -386,87 +386,6 @@ smgrDoAppendOnlyResyncEofs(bool forCommit)
appendOnlyMirrorResyncEofsCount++;
}
-
- /*
- * If we collected Append-Only mirror resync EOFs and bumped the intent
- * count, we need to decrement the counts as part of our end transaction
- * work here.
- */
- if (pendingAppendOnlyMirrorResyncIntentCount > 0)
- {
- MIRRORED_LOCK_DECLARE;
-
- int oldSystemAppendOnlyCommitWorkCount;
- int newSystemAppendOnlyCommitWorkCount;
- int resultSystemAppendOnlyCommitWorkCount;
-
- if (appendOnlyMirrorResyncEofsCount != pendingAppendOnlyMirrorResyncIntentCount)
- elog(ERROR, "Pending Append-Only Mirror Resync EOFs intent count mismatch (pending %d, table count %d)",
- pendingAppendOnlyMirrorResyncIntentCount,
- appendOnlyMirrorResyncEofsCount);
-
- if (entryExample == NULL)
- elog(ERROR, "Not expecting an empty Append-Only Mirror Resync hash table when the local intent count is non-zero (%d)",
- pendingAppendOnlyMirrorResyncIntentCount);
-
- MIRRORED_LOCK;
-/*NOTE: When we use the MirroredLock for the whole routine, this can go. */
-
- LWLockAcquire(FileRepAppendOnlyCommitCountLock, LW_EXCLUSIVE);
-
- oldSystemAppendOnlyCommitWorkCount = FileRepPrimary_GetAppendOnlyCommitWorkCount();
-
- newSystemAppendOnlyCommitWorkCount =
- oldSystemAppendOnlyCommitWorkCount -
- pendingAppendOnlyMirrorResyncIntentCount;
-
- if (newSystemAppendOnlyCommitWorkCount < 0)
- elog(ERROR,
- "Append-Only Mirror Resync EOFs intent count would go negative "
- "(system count %d, entry count %d). "
- "Example relation %u/%u/%u, segment file #%d (persistent serial num " INT64_FORMAT ", TID %s)",
- oldSystemAppendOnlyCommitWorkCount,
- pendingAppendOnlyMirrorResyncIntentCount,
- entryExample->key.relFileNode.spcNode,
- entryExample->key.relFileNode.dbNode,
- entryExample->key.relFileNode.relNode,
- entryExample->key.segmentFileNum,
- entryExample->persistentSerialNum,
- ItemPointerToString(&entryExample->persistentTid));
-
- resultSystemAppendOnlyCommitWorkCount =
- FileRepPrimary_FinishedAppendOnlyCommitWork(pendingAppendOnlyMirrorResyncIntentCount);
-
- /*
- * Should match since we are under FileRepAppendOnlyCommitCountLock
- * EXCLUSIVE.
- */
- Assert(newSystemAppendOnlyCommitWorkCount == resultSystemAppendOnlyCommitWorkCount);
-
- pendingAppendOnlyMirrorResyncIntentCount = 0;
-
- if (Debug_persistent_print ||
- Debug_persistent_appendonly_commit_count_print)
- elog(Persistent_DebugPrintLevel(),
- "Storage Manager: Append-Only Mirror Resync EOFs intent count finishing %s work with system count %d remaining "
- "(enter system count %d, entry count %d, result system count %d). "
- "Example relation %u/%u/%u, segment file #%d (persistent serial num " INT64_FORMAT ", TID %s)",
- (forCommit ? "commit" : "abort"),
- newSystemAppendOnlyCommitWorkCount,
- oldSystemAppendOnlyCommitWorkCount,
- pendingAppendOnlyMirrorResyncIntentCount,
- resultSystemAppendOnlyCommitWorkCount,
- entryExample->key.relFileNode.spcNode,
- entryExample->key.relFileNode.dbNode,
- entryExample->key.relFileNode.relNode,
- entryExample->key.segmentFileNum,
- entryExample->persistentSerialNum,
- ItemPointerToString(&entryExample->persistentTid));
-
- LWLockRelease(FileRepAppendOnlyCommitCountLock);
-
- MIRRORED_UNLOCK;
- }
}
int
