[MGNLCACHE-135] Starting site-aware advanced cache policies results into injection error Created: 10/May/16  Updated: 03/Jun/16  Resolved: 25/May/16

Status: Closed
Project: Cache Modules
Component/s: cache core
Affects Version/s: 5.4.4
Fix Version/s: 5.4.5

Type: Bug Priority: Major
Reporter: Roman Kovařík Assignee: Jaroslav Simak
Resolution: Fixed Votes: 1
Labels: support
Remaining Estimate: 0d
Time Spent: 0.5h
Original Estimate: Not Specified

Issue Links:
causality
caused by MGNLADVCACHE-66 Site aware cache could retrieve mappi... Closed
is causing MGNLADVCACHE-73 Advanced cache module needs to be sta... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: Kromeriz 45
Story Points: 2

 Description   

Since the cache has no dependency to site/multisite modules.

2016-05-10 11:07:33,421 WARN  magnolia.module.cache.AbstractListeningFlushPolicy: Failed to register cache flushing observation for workspace 'dam' (cache named defaultPageCache): 
com.google.inject.ProvisionException: Guice provision errors:

1) Module instance for module [site] not available, most likely because the module has not yet been started. Inject a Provider<> instead to get access to the module instance when it's available.
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:190)
  while locating info.magnolia.module.site.SiteModule

Solution:

  • A] start caches later on modules started event
  • B] add optional dependency to these modules but we have to get rid off these cyclic dependencies:
    • for the site dependency: cache->site->observation->mail->ui-admincentral->cache
    • for the multisite dependency: unknown


 Comments   
Comment by Vivian Steller [ 18/May/16 ]

Two questions:
1. is this really just a warning and we can ignore it? Probably not: those observers should be necessary to flush the cache correctly, no? Very likely this breaks cache flushing respectively the cache functionality all about. Shouldn't this issue get a higher priority then?
2. dump question: wouldn't the fix be as simple as really injecting a provider as the warning message states?

Thanks for looking into this.

Comment by Vivian Steller [ 18/May/16 ]

BTW: this exception does not seem to occur with Magnolia 5.4.5 only with 5.4.6 (and maybe 5.4.4 as initially reported).

Comment by Roman Kovařík [ 18/May/16 ]

Hi vivi,

this affect only Advance Cache 1.7.3, usage of Advance Cache 1.7.2 instead should fix the issue.

1. is this really just a warning and we can ignore it? Probably not: those observers should be necessary to flush the cache correctly, no?

Your answer is correct.

2. dump question: wouldn't the fix be as simple as really injecting a provider as the warning message states?

Unfortunatelly not.

Regards
Roman

Comment by Vivian Steller [ 18/May/16 ]

Thanks, Roman, for the prompt response. We're going back to 1.7.2 then for the time being.

Comment by Roman Kovařík [ 30/May/16 ]

For release notes:

  • cache flush policies are started after all modules had been started to prevent errors when using modules (inside of the flush policies) which hasn't been started yet.
Generated at Sun Feb 11 23:52:33 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.