Lars Francke created SENTRY-2461:
------------------------------------
Summary: Should use DataNucleus Bulk Deletes instead of Delete by
Query for purging tables
Key: SENTRY-2461
URL: https://issues.apache.org/jira/browse/SENTRY-2461
Project: Sentry
Issue Type: Improvement
Reporter: Lars Francke
Sentry purges a bunch of tables (e.g. the `SENTRY_HMS_NOTIFICATION_ID`) but it
uses the `deletePersistentAll` method from DataNucleus which first runs a
SELECT query and materializes all these objects in memory before deleting them.
In our case we accumulated a few million (for reasons as of yet unknown) rows
in the table and Sentry would always run into OOM errors before it could purge
the data.
Instead of the Delete by Query functionality we should use the Bulk Delete
feature and run a "DELETE" command directly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)