Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"supportsAggregatePushdown": does not work correctly on sharded Mongo Cluster #2831

Open
tfold opened this issue Sep 20, 2023 · 0 comments
Open
Labels

Comments

@tfold
Copy link

tfold commented Sep 20, 2023

Drill 1.2.1
Mongo 4.4
Mongodb Config: 2 shards/3 replicas
Mongos on port 27017

DrillBit:

{
"type": "DB",
"connection": "mongodb://mongo01:27017,mongo02:27017/?readPreference=secondaryPreferred",
"pluginOptimizations": {
"supportsProjectPushdown": true,
"supportsFilterPushdown": true,
"supportsAggregatePushdown": true,
"supportsSortPushdown": true,
"supportsUnionPushdown": true,
"supportsLimitPushdown": true
},
"batchSize": 100,
"enabled": true,
"authMode": "SHARED_USER"

Running a count(*) on the above drill only returns the # of records on one shard. Changing "supportsAggregatePushdown": to false reports the correct count from both shards.

Same query from mongo shell reports total across both shards.

Since we are querying mongos from drill, the count should include records from both shards, but for some reason it only reports a count on the shard that it is talking to.

@tfold tfold added the bug label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant