[
https://issues.apache.org/jira/browse/DERBY-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-2884:
--------------------------------------
Attachment: ctxstack.diff
Attached is a patch which adds a field, unmodifiableList, to CtxStack and
changes CtxStack.getUnmodifiableList() so that it keeps a reference to the
returned list. The patch also makes stack_ final to make it clearer that it's
always the same object and that it's OK to always return the same read-only
view of it. No tests have been run yet.
> CtxStack should only create unmodifiable view once per instance
> ---------------------------------------------------------------
>
> Key: DERBY-2884
> URL: https://issues.apache.org/jira/browse/DERBY-2884
> Project: Derby
> Issue Type: Improvement
> Components: Performance, Services
> Affects Versions: 10.4.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: ctxstack.diff
>
>
> Each time a transaction is committed or aborted,
> GenericLanguageConnectionContext.resetSavepoints() goes through the stack of
> statement contexts and invokes resetSavePoint() on them. Instead of
> traversing the list in the CtxStack object directly, it fetches a read-only
> view of the list. Since the lifetime of a CtxStack object and the list within
> it can span multiple transactions, the read-only view only needs to be
> created the first time CtxStack.getUnmodifiableList() is called on an object.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.