The llama project addresses a data race on the CPU backend that occurred when shared sequence copies wrote the same key-value pool representation from multiple scatter entries. The fix ensures each pooled representation is re-pooled exactly once, preventing concurrent write conflicts.

  • Re-pool each shared k-pool representation once to resolve the data race.
  • Assert whole-sequence copying in hybrid index memory to reject partial ranges that could cause invalid pool groupings.
  • Drop the k-pool cache_safe mode, allowing sequences sharing cells to share valid pooled rows without stale-all workarounds.

This change removes unnecessary sharing scans and state invalidation logic, simplifying the sequence copy process while ensuring data integrity.