SEZ9 commented on issue #9866:
URL: https://github.com/apache/seatunnel/issues/9866#issuecomment-5162460867
Could you share your (sanitized) job config, the collection name(s) being
synced, and confirm whether the target collection is actually sharded? Also
please run `db.getSiblingDB('config').collections.find({_id:
'<db>.<collection>'})` and paste the result (redact sensitive data) so we can
see whether the 'key' field is present.
On MongoDB < 5.0, dropped sharded collections can remain in
config.collections with 'dropped: true' and no 'key' field.
ShardedSplitStrategy should probably filter these out or fall back to another
split strategy instead of failing. Please check if the affected collection was
previously dropped/recreated.
As a temporary workaround, you may try cleaning the stale entry in
config.collections (if it corresponds to a dropped collection) or verifying the
user has full read access to the config database. Meanwhile, adding a defensive
check (containsKey('key')) with fallback to
SplitVectorSplitStrategy/SampleBucketSplitStrategy in
ShardedSplitStrategy.split would be a reasonable fix—contributions welcome.
<!-- streview-comment:47 -->
--
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]