Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Problem with concurrent read and write threads
[CDO] Problem with concurrent read and write threads [message #987716] Tue, 27 November 2012 17:29 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
I'm noticing a very strange behavior in the following test I made using concurrent access.
Scenario: I have 2 threads, 1 reader and 1 writer, executing concurrently. We never have write conflicts, because we have only 1 writer.
The threads are executing without any delay, because I want to see how CDO handles many requests. For each iteration, a new session is created.
During the test I get some exceptions (NPE). If I don't make the commit then there isn't any exception.

!ENTRY org.eclipse.net4j 4 0 2012-11-27 16:31:14.217
!MESSAGE NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOBranch(CDODataInputImpl.java:188)
	at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOCommitInfo(CDODataInputImpl.java:276)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitNotificationIndication.indicating(CommitNotificationIndication.java:36)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientIndication.indicating(CDOClientIndication.java:56)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


I checked and the writes didn't failed, everything was persisted.
Is this an "expected" behavior (let's say, a known limitation) when opening and closing so many CDOSession in a very short time? Or can we say it is a bug?
I attached the test java file.
Re: [CDO] Problem with concurrent read and write threads [message #987770 is a reply to message #987716] Wed, 28 November 2012 04:06 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 27.11.2012 18:29, schrieb Silvestre Martins:
> I'm noticing a very strange behavior in the following test I made using concurrent access.
> Scenario: I have 2 threads, 1 reader and 1 writer, executing concurrently. We never have write conflicts, because we have only 1 writer.
> The threads are executing without any delay, because I want to see how CDO handles many requests. For each iteration, a new session is created.
> During the test I get some exceptions (NPE). If I don't make the commit then there isn't any exception.
>
> !ENTRY org.eclipse.net4j 4 0 2012-11-27 16:31:14.217
> !MESSAGE NullPointerException
> !STACK 0
> java.lang.NullPointerException
> at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOBranch(CDODataInputImpl.java:188)
> at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOCommitInfo(CDODataInputImpl.java:276)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitNotificationIndication.indicating(CommitNotificationIndication.java:36)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientIndication.indicating(CDOClientIndication.java:56)
> at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> I checked and the writes didn't failed, everything was persisted.
> Is this an "expected" behavior (let's say, a known limitation) when opening and closing so many CDOSession in a very short time? Or can we say it is a bug?
> I attached the test java file.
Looks like a duplicate of your other post.
Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Problem with concurrent read and write threads [message #988423 is a reply to message #987770] Thu, 29 November 2012 20:47 Go to previous message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member

That's true. Some problems with the browser Sad
Please do not post any reply to this topic, use the other instead:
http://www.eclipse.org/forums/index.php/t/440689/

[Updated on: Thu, 29 November 2012 20:48]

Report message to a moderator

Previous Topic:[CDO] disable revisions
Next Topic:[EMF] Notification.REMOVE_MANY not used.
Goto Forum:
  


Current Time: Thu Apr 25 05:39:37 GMT 2024

Powered by FUDForum. Page generated in 0.03517 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top