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

Add config to disable ORDER BY clause #3128

Merged
merged 6 commits into from
Jul 26, 2022

Conversation

rodrigozhou
Copy link
Contributor

What changed?
Added a config to disable ORDER BY clause for Elasticsearch. When passing an ORDER BY clause when it's disabled, it will return an error.

Why?
Elasticsearch can be slow to sort large amounts of documents by fields that are not indexed. This option disables this kind of operation to prevent blocking writes to ES.

How did you test it?
Passed existing unit tests, and added new unit tests.

Potential risks
The config is set to false at this moment, so this should be a no-op.

Is hotfix candidate?
No.

@rodrigozhou rodrigozhou requested a review from a team as a code owner July 21, 2022 18:55
common/dynamicconfig/constants.go Outdated Show resolved Hide resolved
@rodrigozhou rodrigozhou enabled auto-merge (squash) July 26, 2022 02:01
@rodrigozhou rodrigozhou merged commit 16df6dd into temporalio:master Jul 26, 2022
@rodrigozhou rodrigozhou deleted the disable-order-by-filter branch July 26, 2022 21:24
alexshtin pushed a commit that referenced this pull request Jul 29, 2022
* Add config to disable ORDER BY clause

* Fix unit test: add check for nil value

* Move config out of history config to frontend and worker configs.

* Rename config to visibilityDisableOrderByClause

* Fix typo and error type

* Fix unit test
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.

3 participants