You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2026/10/11 14:23:00 UTC

[jira] [Updated] (CAY-3047) Per-statement "snapshotVersion"

     [ https://issues.apache.org/jira/browse/CAY-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-3047:
---------------------------------
    Description: 
Currently DataRow.version / PersistentObject.snapshotVersion is taken from a shared "long", that is incremented for each row. We are going to change that to per-statement value, so all the rows read or committed in a single operation will share the version.

This has a minor positive effect on performance (about 1% of the total query run in a specific benchmark; we were unable to saturate it enough for AtomicLong.getAndIncrement() to become a contention point). 

But the main goal is to make the version more meaningful and take certain shortcuts when concurrently loading multiple query results into a shared context.

 

  was:
Currently DataRow.version / PersistentObject.snapshotVersion is taken from a shared "long", that is incremented for each row. We are going to change that to per-statement value, so all the rows read or committed in a single operation will share the version.

This has a minor positive effect on performance (about 1% of the total query run in a specific benchmark; we were unable to saturate it enough for AtomicLong.getAndIncrement() to become a contention point). 

But the main goal is to make the version more meaningful when concurrently loading multiple query results into a shared context.

 


> Per-statement "snapshotVersion"
> -------------------------------
>
>                 Key: CAY-3047
>                 URL: https://issues.apache.org/jira/browse/CAY-3047
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 5.0-M4
>
>
> Currently DataRow.version / PersistentObject.snapshotVersion is taken from a shared "long", that is incremented for each row. We are going to change that to per-statement value, so all the rows read or committed in a single operation will share the version.
> This has a minor positive effect on performance (about 1% of the total query run in a specific benchmark; we were unable to saturate it enough for AtomicLong.getAndIncrement() to become a contention point). 
> But the main goal is to make the version more meaningful and take certain shortcuts when concurrently loading multiple query results into a shared context.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)