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

bypass partition query limit for mango #3105

Merged
merged 2 commits into from
Aug 28, 2020
Merged

Conversation

tonysun83
Copy link
Contributor

Overview

When partition_query_limit is set for couch_mrview, it limits how many
docs can be scanned when executing partitioned queries. But this limits
mango's doc scans internally. This leads to documents not being scanned
to fulfill a query. This fixes:
#2795

Testing recommendations

Unit Test added.

Related Issues or Pull Requests

Checklist

@tonysun83 tonysun83 requested a review from davisp August 27, 2020 04:49
Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor style issues.

src/mango/src/mango_cursor_view.erl Outdated Show resolved Hide resolved
test/elixir/test/partition_mango_test.exs Show resolved Hide resolved
When partition_query_limit is set for couch_mrview, it limits how many
docs can be scanned when executing partitioned queries. But this limits
mango's doc scans internally. This leads to documents not being scanned
to fulfill a query. This fixes:
#2795
@tonysun83
Copy link
Contributor Author

@wohali CI seems to be failing with python-black issues. I'm not sure if it's related to this PR as I have not made any changes to python files. I've rebuilt it a few times already with no luck. See anything I'm missing?

@wohali
Copy link
Member

wohali commented Aug 27, 2020

Hey @tonysun83 ,

[2020-08-27T19:38:24.347Z] would reformat /home/****/workspace/****-cm1_PullRequests_PR-3105/20.3.8.11/build/apache-couchdb-3.0.0-7dbd0ad/dev/run

Looking at the commit history, dev/run got changed 5 months ago, and my change to ensure black was run across all files dates from April, and commits have passed since then. So this must be related to a new check in python black.

If you run make python-black-update you can fix the problem, then commit the change it makes to this PR.

I realize this, strictly speaking, is an unrelated change to fixing mango, but your help is greatly appreciated :) and a single PR is faster than 2.

@tonysun83
Copy link
Contributor Author

thx @wohali , it looks good!

Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good except for the random hunk mixed in.

"^\[httpd\]$",
"[httpd]\nenable = true",
contents,
flags=re.MULTILINE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this change for? Looks like styling which we shouldn't mix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line's too long, required change to make python black happy. It is unrelated but needs to go in because otherwise tests fail. Don't give him grief on this one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Fair enough.

Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@tonysun83 tonysun83 merged commit ac69520 into master Aug 28, 2020
@tonysun83 tonysun83 mentioned this pull request Aug 28, 2020
4 tasks
@tonysun83 tonysun83 deleted the fix-partition-query-limit branch August 28, 2020 17:55
@wohali
Copy link
Member

wohali commented Aug 28, 2020

@tonysun83 Would you backport this (mango) fix to 3.x too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants