goutamadwant opened a new pull request, #12839:
URL: https://github.com/apache/seatunnel/pull/12839
### Purpose of this pull request
Fixes #12838.
This PR contributes an opt-in composite document-ID encoding to SeaTunnel's
Easysearch and Typesense sinks. With the existing delimiter-based encoding, the
keys `("1_1", "2")` and `("1", "1_2")` both produce `1_1_2`, so one write can
overwrite the other.
`key_encoding = LENGTH_PREFIXED` produces distinct IDs (`3:1_11:2` and
`1:13:1_2`). `LEGACY` remains the default. Single-key IDs are unchanged.
### Does this PR introduce _any_ user-facing change?
Yes. Both sinks gain the optional `key_encoding` setting, documented in
English and Chinese. Existing jobs retain their current IDs without
configuration changes.
Switching an existing composite-key index or collection to `LENGTH_PREFIXED`
changes document identity. Existing documents should be migrated or recreated
first; otherwise subsequent writes can create duplicates instead of updating
the old IDs.
### How was this patch tested?
- Reproduced the colliding ID and overwrite against local Easysearch and
Typesense services.
- Passed 30 Easysearch and Typesense connector unit tests, including
legacy-ID, collision-safe-ID, and single-key cases.
- Passed one SeaTunnel Zeta E2E test against each local service; both
Failsafe reports show 0 failures and 0 errors.
- Checked formatting and the final diff. Full repository CI remains for the
PR.
### Check list
- [x] Updated EN/ZH connector documentation.
- [x] Added connector E2E coverage.
- [x] No new dependencies or JARs.
- [x] No default-ID or public-API change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]