Parent: #830
After PR #934, snapshotProducer.commit() appends a validate closure to txn.validators for every producer, including fastAppendFiles and mergeAppendFiles whose validate() is a deliberate no-op. Long transactions (multi-step Append + Overwrite chains) accumulate O(N) no-op closures, all of which run at final doCommit. Cheap per call, but wasteful and noisy in profiles.
Add a small interface method to producerImpl, something like needsValidation() bool. Default to true; have fastAppendFiles and mergeAppendFiles return false. Skip the validator registration in snapshotProducer.commit() when needsValidation() is false. The no-op validate methods can stay as belt-and-suspenders or be removed once the registration is gated.
Lock the behavior with a small unit test that asserts a fast-append commit leaves txn.validators empty. Flagged as a smell in #928's round-1 review and deferred — landing it now makes the validator slice trustworthy as a registration surface.
Parent: #830
After PR #934,
snapshotProducer.commit()appends avalidateclosure totxn.validatorsfor every producer, includingfastAppendFilesandmergeAppendFileswhosevalidate()is a deliberate no-op. Long transactions (multi-stepAppend+Overwritechains) accumulate O(N) no-op closures, all of which run at finaldoCommit. Cheap per call, but wasteful and noisy in profiles.Add a small interface method to
producerImpl, something likeneedsValidation() bool. Default totrue; havefastAppendFilesandmergeAppendFilesreturnfalse. Skip the validator registration insnapshotProducer.commit()whenneedsValidation()is false. The no-opvalidatemethods can stay as belt-and-suspenders or be removed once the registration is gated.Lock the behavior with a small unit test that asserts a fast-append commit leaves
txn.validatorsempty. Flagged as a smell in #928's round-1 review and deferred — landing it now makes the validator slice trustworthy as a registration surface.