This has happened sporadically multiple times on job for spark_create_intermediate_table, which runs this code backfill_create_intermediate_table.py.
I believe a quick fix similar to what we did in T340863#9397991 will fix this issue. TL;DR: Make the temporary table also be ALTER TABLE tmp.tmp_table WRITE ORDERED BY wiki_db, revision_timestamp.