[core.savedObjects] Expose PointInTimeFinder as a helper for paging through SOs #91175
Labels
chore
Feature:Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
In #89915 we introduced a
PointInTimeFinder
to make it easy to iterate over large numbers of saved objects usingpit
andsearch_after
.Currently this helper is only used internally by the
SavedObjectsExporter
, however we think it would be beneficial to expose this somewhere public as the logic is easy to mess up (for example, forgetting to close a PIT right after you are done with it could have detrimental effects on your cluster).Depending on where it lives, the usage may need to be adjusted somewhat, but my immediate thought would be to put it in the saved objects client itself:
An alternative would be exporting it as a static helper as it is currently used internally, which would require a
logger
andsavedObjectsClient
to be provided by the consumer. However, I think it might be nice to be able to keep the logs together under thesavedobjects-service
context, rather than having them attached to any arbitrary logger a consumer provides.WDYT @pgayvallet @rudolf?
The text was updated successfully, but these errors were encountered: