{"id":"async-index-defers-mutations","text":"With `async_index=True`, `TermPartitionedDB` queues index operations in `_pending` instead of applying them immediately; `flush_index()` must be called to drain the queue, modeling asynchronous global index updates.","truth_value":"IN","source":"entries/2026/05/29/secondary-index-partitioning-secondary_index_partitioning.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"self._pending_updates.append((field, value, doc_id))\n# index not updated until flush/apply"},"explanation":{"steps":[{"node":"async-index-defers-mutations","truth_value":"IN","reason":"premise"}]}}