jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1388) Jackrabbit does not allow concurrent reads to the data store if copyWhenReading=false
Date Mon, 17 Mar 2008 16:19:24 GMT

    [ https://issues.apache.org/jira/browse/JCR-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579497#action_12579497
] 

Thomas Mueller commented on JCR-1388:
-------------------------------------

Hi,
Sorry for the delay... I think there is one potential problem in assertEquals(String message,
InputStream i1, InputStream i2):

+            int b1 = 0, b2 = 0;
+            int i = 0;
+            while (b1 != -1 || b2 != -1) {
+                b1 = i1.read();
+                b2 = i2.read();
+                assertEquals(message + "; byte #" + i + " mismatch!", (byte) b2, (byte) b1);
+                ++i;
+            }

This test wouldn't detect a problem if b1 is -1 and b2 is 255. I would change the code to:

assertEquals(message + "; byte #" + i + " mismatch!", b2, b1);

Everything else looks fine to me.
Regards,
Thomas


> Jackrabbit does not allow concurrent reads to the data store if copyWhenReading=false
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-1388
>                 URL: https://issues.apache.org/jira/browse/JCR-1388
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: 1.4
>         Environment: WinXP x64, Eclipse, remote SQL Server 2005
>            Reporter: Esteban Franqueiro
>         Attachments: JCR-1388-datastore-concurrent-reads.10.patch, JCR-1388-datastore-concurrent-reads.2.patch,
JCR-1388-datastore-concurrent-reads.4.patch, JCR-1388-datastore-concurrent-reads.8.patch,
JCR-1388-datastore-concurrent-reads.patch, TestTwoGetStreams.java
>
>
> Jackrabbit does not allow concurrent reads to the data store if copyWhenReading=false,
even if maxConnections>1.
> See JCR-1184 for a test for this problem (run it with copyWhenReading=false).

-- 
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