[MAGNOLIA-3473] Race condition when resetting the filter chain Created: 17/Dec/10 Updated: 02/Dec/13 Resolved: 02/Dec/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core, updatemechanism |
| Affects Version/s: | 4.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tobias Mattsson | Assignee: | Philipp Bärfuss |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| 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
|
||||
| Description |
|
In MgnlMainFilter when the filter chain is reset to use the normal ui requests can enter the install/update -ui when it is being destroyed / has been destroyed and enter the normal filter chain before the init() methods have been called. To fix it we need to fully initialize the new filter, swap the instances, and then destroy the previous instance. Since the instance can be swapped while being used access to it should be synchronized. Should use the minimal amount of synchronization possible. Like a volatile field or java.util.concurrent.AtomicReference. |