empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francis De Brabandere (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] Commented: (EMPIREDB-49) Non-thread-safe counters
Date Tue, 01 Sep 2009 17:46:32 GMT

    [ https://issues.apache.org/jira/browse/EMPIREDB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750009#action_12750009
] 

Francis De Brabandere commented on EMPIREDB-49:
-----------------------------------------------

I'm pro AtomicLongs here

Did you use a tool to find these?

> Non-thread-safe counters
> ------------------------
>
>                 Key: EMPIREDB-49
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-49
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.0.5-incubating
>            Reporter: Sebb
>
> There are various static counters which are not accessed in a thread-safe way.
> At present, multiple threads may see duplicate numbers.
> The fields involved are:
> DBQuery.queryCount
> DBTable.tableCount
> DBView.viewCount
> All access to these fields needs to be synchronised to ensure uniqueness. Volatile is
not sufficient.
> Perhaps use AtomicInteger variables instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message