Keep tombstones for expired search context ids #29543
Labels
>enhancement
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Search contexts are expired by the search service if they are not accessed within a certain amount of time. Though we don't keep any information on expired search context and that means that users that tries to access them get a cryptic error saying that the search context cannot be found on some node.
It's also difficult to know when debugging such issues if the search context is not there because it was expired or because of a bug. When discussing #29252 @s1monw had the idea to keep a map of expired search context ids so that when a query tries to access these expired search contexts we can produce an error message that explains why this search context is not present anymore. This map could for instance contain the id of the search context and the timestamp of when it was expired. Of course we cannot keep these tombstones forever but since they are lightweight we can apply a different expiration period for them (at least longer than the expiration period of the original search context ;) ).
The text was updated successfully, but these errors were encountered: