Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run more than one cleanup simultaneously #83

Closed
rymsha opened this issue Dec 30, 2024 · 0 comments · Fixed by #90
Closed

Do not run more than one cleanup simultaneously #83

rymsha opened this issue Dec 30, 2024 · 0 comments · Fixed by #90
Assignees
Labels
enhancement New feature or request

Comments

@rymsha
Copy link
Contributor

rymsha commented Dec 30, 2024

We had cases when booster creates a hundred or so tasks that spin infinitely

We should limit number of simultaneous invalidate and cleanup tasks

"task-com.enonic.app.booster:invalidate-f5073cec-d750-46a6-88bc-f2b36a78ee7f" #344 prio=5 os_prio=0 cpu=6277656.96ms elapsed=682675.67s tid=0x00007f9dc4b9d580 nid=0x1ae waiting on condition  [0x00007f9d6a8d9000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x000000078036c578> (a org.elasticsearch.common.util.concurrent.BaseFuture$Sync)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:715)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly([email protected]/AbstractQueuedSynchronizer.java:1047)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:280)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:120)
	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:42)
	at com.enonic.xp.repo.impl.elasticsearch.IndexServiceInternalImpl.refresh(IndexServiceInternalImpl.java:85)
	at com.enonic.xp.repo.impl.node.RefreshCommand.execute(RefreshCommand.java:49)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.executeRefresh(NodeServiceImpl.java:808)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.lambda$refresh$29(NodeServiceImpl.java:802)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl$$Lambda$2421/0x00007f9dd1898cf0.get(Unknown Source)
	at com.enonic.xp.trace.Tracer.trace(Tracer.java:128)
	at com.enonic.xp.trace.Tracer.trace(Tracer.java:134)
	at com.enonic.xp.repo.impl.node.NodeServiceImpl.refresh(NodeServiceImpl.java:799)
	at com.enonic.app.booster.storage.NodeCleanerBean.process(NodeCleanerBean.java:191)
	at com.enonic.app.booster.storage.NodeCleanerBean.lambda$invalidateByQuery$8(NodeCleanerBean.java:171)
	at com.enonic.app.booster.storage.NodeCleanerBean$$Lambda$2396/0x00007f9dd10b62c0.run(Unknown Source)
	at com.enonic.app.booster.storage.BoosterContext.lambda$runInContext$0(BoosterContext.java:24)
	at com.enonic.app.booster.storage.BoosterContext$$Lambda$2397/0x00007f9dd10b64e8.call(Unknown Source)
	at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:100)
	at com.enonic.app.booster.storage.BoosterContext.callInContext(BoosterContext.java:39)
	at com.enonic.app.booster.storage.BoosterContext.runInContext(BoosterContext.java:23)
	at com.enonic.app.booster.storage.NodeCleanerBean.invalidateByQuery(NodeCleanerBean.java:169)
	at com.enonic.app.booster.storage.NodeCleanerBean.invalidateProjects(NodeCleanerBean.java:64)
	at java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual([email protected]/DirectMethodHandle$Holder)
	at java.lang.invoke.LambdaForm$MH/0x00007f9dd0c84c00.invoke([email protected]/LambdaForm$MH)
	at java.lang.invoke.LambdaForm$MH/0x00007f9dd0c23400.reinvoke([email protected]/LambdaForm$MH)
	at java.lang.invoke.LambdaForm$MH/0x00007f9dd0c23800.guard([email protected]/LambdaForm$MH)
	at java.lang.invoke.Invokers$Holder.linkToCallSite([email protected]/Invokers$Holder)
	at org.openjdk.nashorn.internal.scripts.Script$Recompilation$2262$70AA$invalidate.L:1#run(com.enonic.app.booster:/tasks/invalidate/invalidate.js:26)
@rymsha rymsha added the enhancement New feature or request label Dec 30, 2024
@rymsha rymsha self-assigned this Dec 30, 2024
@rymsha rymsha changed the title Do not run more than 1 cleanup simultaneously. Do not run more than one cleanup simultaneously. Dec 30, 2024
@rymsha rymsha changed the title Do not run more than one cleanup simultaneously. Do not run more than one cleanup simultaneously Dec 30, 2024
@rymsha rymsha closed this as completed Jan 21, 2025
@rymsha rymsha linked a pull request Jan 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant