Skip to content

Replace Fixed build with scope parameter#118643

Merged
idegtiarenko merged 5 commits intoelastic:mainfrom
idegtiarenko:update_fixed_annotation
Dec 17, 2024
Merged

Replace Fixed build with scope parameter#118643
idegtiarenko merged 5 commits intoelastic:mainfrom
idegtiarenko:update_fixed_annotation

Conversation

@idegtiarenko
Copy link
Contributor

@idegtiarenko idegtiarenko commented Dec 13, 2024

This change replaces the @Fixed build with scope parameter in order to make it cleaner when parameter is build and how it is used.

This change replaces the build with scope parameter in order to make
it cleaner when parameter is build and how it is used.
@idegtiarenko idegtiarenko added >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.0.0 v8.18.0 labels Dec 13, 2024
Comment on lines -37 to +47
boolean build() default false;
Scope scope() default Scope.SINGLETON;

/**
* Defines the parameter scope
*/
enum Scope {
/**
* Should be used for immutable parameters that can be shared across different threads
*/
SINGLETON,
/**
* Should be used for mutable or not thread safe parameters
*/
THREAD_LOCAL,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main change is here.
Please let me know if you have a better naming in mind.

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

LGTM. It's nice to see that we don't change any of the generated files with this.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@idegtiarenko idegtiarenko force-pushed the update_fixed_annotation branch from 9face5f to 721c0f1 Compare December 17, 2024 12:33
@idegtiarenko idegtiarenko merged commit b8f4677 into elastic:main Dec 17, 2024
@idegtiarenko idegtiarenko deleted the update_fixed_annotation branch December 17, 2024 17:11
@idegtiarenko idegtiarenko added the auto-backport Automatically create backport pull requests when merged label Dec 18, 2024
idegtiarenko added a commit to idegtiarenko/elasticsearch that referenced this pull request Dec 18, 2024
This change replaces the build with scope parameter in order to make
it cleaner when parameter is build and how it is used.

(cherry picked from commit b8f4677)
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
This change replaces the build with scope parameter in order to make
it cleaner when parameter is build and how it is used.

(cherry picked from commit b8f4677)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants