bug-20724: Add unit tests for comparison functions
bug-20724: Lock mark_sync and mark_sent functions to avoid secondary index corruption timing issue