Skip to content

Investigate if datastore commit is needed #34

@simonbjorzen-ts

Description

@simonbjorzen-ts

The datastore commit function does a refresh as well as a clear_cache of the elasticsearch database.

def commit(self):

This function is called from several places in the code, but maybe most important is upon hit creation.

datastore().hit.commit()

Clearing the index cache can negatively impact ES performance and potentially slow down the entire system.

If some database queries need to ignore the cache, the cache can be bypassed using the request_cache=false parameter:
https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_enabling_and_disabling_caching_per_request

However, the cached results are automatically invalidated upon index refresh, so this may not be needed at all.
ref: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_cache_invalidation

Metadata

Metadata

Assignees

Labels

apiIssues/Pull Requests related to the Howler APIpythonPull requests that update python code

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions