#28788·scylladb

[Bug]: Batch does not preserve operation order when ts is provided

Author: dkropachevCreated Feb 24, 2026Updated Sep 16, 2026
Labelsbugarea/cql

Code of Conduct

  • I have read the disclaimer above and am reporting a suspected malfunction in Scylla.

product version

2025.1

Cluster Size

1

OS

docker

Additional Environmental Data

Platform (physical/VM/cloud instance type/docker): docker

Reproduction Steps

session = Cluster(["127.0.0.1"]).connect()

session.execute("CREATE KEYSPACE IF NOT EXISTS test_ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}")
session.execute("CREATE TABLE IF NOT EXISTS test_ks.list_test (key INT PRIMARY KEY, lcol list<text>)")
session.execute("TRUNCATE test_ks.list_test")
time.sleep(0.5)

ts = int(time.time() * 1e6)

# BUG: batch with same timestamp — only 1 of 3 elements survives
batch = BatchStatement(batch_type=BatchType.UNLOGGED)
batch.add(SimpleStatement(f"UPDATE test_ks.list_test USING TIMESTAMP {ts} SET lcol = lcol + ['One'] WHERE key = 1"))
batch.add(SimpleStatement(f"UPDATE test_ks.list_test USING TIMESTAMP {ts} SET lcol = lcol + ['Two'] WHERE key = 1"))
batch.add(SimpleStatement(f"UPDATE test_ks.list_test USING TIMESTAMP {ts} SET lcol = lcol + ['Three'] WHERE key = 1"))
session.execute(batch)

Results in:

['Two']

While it should end up in:

['One', 'Two', 'Three']

What is the problem?

Operation order is lost

Expected behavior?

Operation order from batch is honored

reproduce_issue_26.py