Files
payloadcms/packages/plugin-search
Patrik 79b25577b9 fix(plugin-search): transaction state errors in parallel reindex operations (#13915)
### What?

Fixed flaky MongoDB transaction state errors ("Attempted illegal state
transition from `[TRANSACTION_ABORTED]` to `[TRANSACTION_COMMITTED]`")
in plugin-search int tests.

### Why?

When reindexing multiple collections in parallel, individual collection
failures were calling `killTransaction()` on a shared
transaction that other parallel operations were still using, causing
MongoDB transaction state conflicts and test flakiness.

### How?

- Moved transaction cleanup to outer catch block only
- Removed individual `killTransaction` calls that created race
conditions
- Allow parallel operations to handle their own errors without aborting
the shared transaction
2025-09-23 13:59:46 -07:00
..
2022-02-19 11:02:55 -05:00

Payload Search Plugin

A plugin for Payload to generate records of your documents that are extremely fast to search on.