exist icon indicating copy to clipboard operation
exist copied to clipboard

Issue #4890 trigger leak analysis

Open reinhapa opened this issue 1 year ago • 10 comments

Analysis and simplifications to tackle the leaking trigger states.

reinhapa avatar Apr 30 '24 18:04 reinhapa

@line-o I did some clean ups in preparation for looking into the actual leak. As soon I got your minimal restore example, I try to setup a according test, that may show the issue and can be used to reproduce.

reinhapa avatar Apr 30 '24 19:04 reinhapa

@reinhapa can you tell me a little about your thinking around removing the ThreadLocal please?

adamretter avatar Apr 30 '24 19:04 adamretter

@reinhapa can you tell me a little about your thinking around removing the ThreadLocal please?

It's to get more easy access to all currently known per-thread entries in order to find the actual leak behaviour as those can be found more easy as within the thread local variable. It's not intended to stay that way when I got to the actual ground of the problem.

reinhapa avatar Apr 30 '24 20:04 reinhapa

@reinhapa here is the backup to restore full-backup-restore-with-triggers.zip

The collection where an update trigger is configured is /db/apps/restore-with-trigger-test

line-o avatar May 01 '24 18:05 line-o

to find the actual leak behaviour

What is the leak that you are mentioning? is there a GitHub issue for this I can take a look at?

adamretter avatar May 02 '24 09:05 adamretter

What is the leak that you are mentioning? is there a GitHub issue for this I can take a look at?

@adamretter its issue #4890 where trigger state objects accumulate and only released after the full backup is complete (as I understand @line-o)

reinhapa avatar May 02 '24 15:05 reinhapa

They do not get removed after the backup is completed. One needs to restart the instance to get rid of them.

line-o avatar May 02 '24 18:05 line-o

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
51.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 27 '24 18:05 sonarqubecloud[bot]

disable triggers -> breaks stuff ?

dizzzz avatar Aug 26 '24 18:08 dizzzz

See: https://github.com/eXist-db/exist/issues/4890#issuecomment-2314672530

adamretter avatar Aug 28 '24 11:08 adamretter