Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
None
-
Severity 3 - Minor
-
Description
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Code to reproduce:
public void storeConfiguration() throws RuntimeException { transactionTemplate.execute(new TransactionCallback() { public Object doInTransaction() { bandanaManager.setValue(context, "fooKey", "fooValue"); throw new RuntimeException("Boom!"); bandanaManager.setValue(context, "barKey", "barValue"); } }); }
Testcode: bandanaManager.getValue(context, "fooKey"); gives fooValue what shouldn't be.
Question on Answers: https://answers.atlassian.com/questions/84519/does-the-confluence-bandanamanager-support-transaction-rollback
Update, answer to why resolution is "won't fix"
It example above bandana manager is not database bandana manager, but caching wrapper around it. In confluence a lot of things are relying on bandana including core things like plugins state. When we made bandana caching persister fully transactional then we were getting plugin inconsistent states and other test failures across our builds. Decision was to leave it `as is` since other products (like jira) do not provide transactional caches anyway (like confluence does) anyway and values in caches will be poisoned on transaction failure.
If you still need transactional aware key->value storage you can use raw bandana manager (not wrapped with cached) and wrap it with transactional cache. It still will work for plugin code, it's just transactional bandana doesn't work for core confluence features.
Side thought
Given that transactional bandana manager is problem for confluence core we might just exposed two beans - one for plugin devs(transactional) and one for confluence core (non-transactional).
Attachments
Issue Links
- relates to
-
CONFCLOUD-26695 BandanaManager does not support rollback inside a TransactionTemplate
- Closed