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
Filtered aliases which use now()
should not be cached
#8474
Labels
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
help wanted
adoptme
v1.3.6
v1.4.1
v1.5.0
v2.0.0-beta1
Comments
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this issue
Nov 19, 2014
…xecuted on the last possible moment to aid with index aliases and percolator queries using `now` date expression. Percolator queries and index alias filters are parsed once and reused as long as they exist on a node. If they contain time based range filters with a `now` expression then the alias filters and percolator queries are going to be incorrect from the moment these are constructed (depending on the date rounding). If a range filter or range query is constructed as part of adding a percolator query or a index alias filter then these get wrapped in special query or filter wrappers that defer the resolution of now at last possible moment as apposed during parse time. In the case of the range filter a special Resolvable Filter makes sure that `now` is resolved when the DocIdSet is pulled and in the case of the range query `now` is resolved at query rewrite time. Both occur at the time the range filter or query is used as apposed when the query or filter is constructed during parse time. Closes elastic#8474 Closes elastic#8534
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this issue
Nov 19, 2014
…xecuted on the last possible moment to aid with index aliases and percolator queries using `now` date expression. Percolator queries and index alias filters are parsed once and reused as long as they exist on a node. If they contain time based range filters with a `now` expression then the alias filters and percolator queries are going to be incorrect from the moment these are constructed (depending on the date rounding). If a range filter or range query is constructed as part of adding a percolator query or a index alias filter then these get wrapped in special query or filter wrappers that defer the resolution of now at last possible moment as apposed during parse time. In the case of the range filter a special Resolvable Filter makes sure that `now` is resolved when the DocIdSet is pulled and in the case of the range query `now` is resolved at query rewrite time. Both occur at the time the range filter or query is used as apposed when the query or filter is constructed during parse time. Closes elastic#8474 Closes elastic#8534
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this issue
Nov 19, 2014
…xecuted on the last possible moment to aid with index aliases and percolator queries using `now` date expression. Percolator queries and index alias filters are parsed once and reused as long as they exist on a node. If they contain time based range filters with a `now` expression then the alias filters and percolator queries are going to be incorrect from the moment these are constructed (depending on the date rounding). If a range filter or range query is constructed as part of adding a percolator query or a index alias filter then these get wrapped in special query or filter wrappers that defer the resolution of now at last possible moment as apposed during parse time. In the case of the range filter a special Resolvable Filter makes sure that `now` is resolved when the DocIdSet is pulled and in the case of the range query `now` is resolved at query rewrite time. Both occur at the time the range filter or query is used as apposed when the query or filter is constructed during parse time. Closes elastic#8474 Closes elastic#8534
Is there anyway to work around this issue in elasticsearch v 0.90? |
@swarzech no, you'll need to upgrade |
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
…xecuted on the last possible moment to aid with index aliases and percolator queries using `now` date expression. Percolator queries and index alias filters are parsed once and reused as long as they exist on a node. If they contain time based range filters with a `now` expression then the alias filters and percolator queries are going to be incorrect from the moment these are constructed (depending on the date rounding). If a range filter or range query is constructed as part of adding a percolator query or a index alias filter then these get wrapped in special query or filter wrappers that defer the resolution of now at last possible moment as apposed during parse time. In the case of the range filter a special Resolvable Filter makes sure that `now` is resolved when the DocIdSet is pulled and in the case of the range query `now` is resolved at query rewrite time. Both occur at the time the range filter or query is used as apposed when the query or filter is constructed during parse time. Closes elastic#8474 Closes elastic#8534
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
…xecuted on the last possible moment to aid with index aliases and percolator queries using `now` date expression. Percolator queries and index alias filters are parsed once and reused as long as they exist on a node. If they contain time based range filters with a `now` expression then the alias filters and percolator queries are going to be incorrect from the moment these are constructed (depending on the date rounding). If a range filter or range query is constructed as part of adding a percolator query or a index alias filter then these get wrapped in special query or filter wrappers that defer the resolution of now at last possible moment as apposed during parse time. In the case of the range filter a special Resolvable Filter makes sure that `now` is resolved when the DocIdSet is pulled and in the case of the range query `now` is resolved at query rewrite time. Both occur at the time the range filter or query is used as apposed when the query or filter is constructed during parse time. Closes elastic#8474 Closes elastic#8534
clintongormley
added
:Data Management/Indices APIs
APIs to create and manage indices and templates
and removed
:Aliases
labels
Feb 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
help wanted
adoptme
v1.3.6
v1.4.1
v1.5.0
v2.0.0-beta1
If an alias has a filter with a date-range expression containing
now()
, it is rewritten to use the concrete value thatnow()
has at the time the filter is parsed, and is then cached. Worse than that, if a shard is moved from one node to another, the filter is reparsed, meaning thatnow()
on the new node can be substantially different from the value on other nodes.Instead, we should not cache filters that use
now()
, and just reparse them on every query.The text was updated successfully, but these errors were encountered: