Following up ona57c087c89, compare_atomic_cell_for_merge should compare the ttl value in the reverse order since, when comparing two cells that are identical in all attributes but their ttl, we want to keep the cell with the smaller ttl value rather than the larger ttl, since it was written at a later (wall-clock) time, and so would remain longer after it expires, until purged after gc_grace seconds. Fixes #10173 Test: mutation_test.test_cell_ordering, unit(dev) Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20220302154328.2400717-1-bhalevy@scylladb.com> Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20220306091913.106508-1-bhalevy@scylladb.com> (cherry picked from commita085ef74ff)