django-elasticsearch-dsl icon indicating copy to clipboard operation
django-elasticsearch-dsl copied to clipboard

Logerrors

Open btimby opened this issue 6 years ago • 2 comments

This PR address #31 by introducing a setting. ELASTICSEARCH_DSL_AUTOSYNC_LOG_ERRORS. This setting is False by default (current functionality is preserved). However, when enabled, errors are logged (but not raised) by the BaseSignalProcessor and it's subclasses.

I want this option to allow myself to have best effort real time indexing without sinking the ship for every indexing error. This option in combination with periodic rebuild of the indexes should provide the trade-off I am looking for.

btimby avatar Jun 07 '18 14:06 btimby

This is interesting! can you explain the use case a bit more?

safwanrahman avatar Sep 21 '18 23:09 safwanrahman

Like #31, my case is that I don't want an ElasticSearch problem to affect database transactions. I don't want an exception in the signal handler to report an error or fail to make the change.

IOW, I want ES errors to be ignored (but logged) in the signal handler. Then I have a cron job that rebuilds the index periodically (to resolve these errors).

This is best-effort real-time synchronization with periodic full synchronization.

btimby avatar Sep 24 '18 15:09 btimby