In shared-cache mode SQLite locks per table and answers a blocked write with SQLITE_LOCKED, which busy_timeout does not wait out. The block write then failed outright and every other write in indexBlock was dropped unseen.