coherence-community / coherence-incubator

Coherence Incubator
37 stars 37 forks source link

Error when submitting commands after changing cluster members #100

Open brianoliver opened 10 years ago

brianoliver commented 10 years ago

When I try to submit a command using a pre-resgistered command context, I get the following kind for errors for some of the contexts. This issue is especially reproducible when new nodes join the coherence cluster Or when one of existing nodes is brought down.

Exception in thread "main" java.lang.IllegalArgumentException: Can't submit Command com.oracle.bpm.cloud.platform.cqrs.eventhandling.impl.HandleEventCommand@3f91440b to Context Identifier

{EVENTBUS_ORDERED_SUBSCRIBER_TestEventListener_9}

as the Context does not exist at com.oracle.coherence.patterns.command.DefaultCommandSubmitter.submitCommand(DefaultCommandSubmitter.java:99) at com.oracle.bpm.cloud.platform.cqrs.eventhandling.impl.CoherenceEventBus.publish(CoherenceEventBus.java:56) at com.oracle.bpm.cloud.platform.cqrs.eventhandling.TestPublisher.publish(TestPublisher.java:65) at com.oracle.bpm.cloud.platform.cqrs.eventhandling.TestPublisher.main(TestPublisher.java:80)

Following are my observation

  1. In a single node, registration of context and submit command works fine

  2. Now, when i bring up the 2nd node (commands are being submitted from node1) , For some of the context, command submission fails with error... Based on little debugging, I see that for some of the contexts, it tries to process the command in node 2... However, The context did not get moved to node2 (in the event interceptor , i did not see any arrive event in node2) .. and hence the command submision fails with error

  3. Now suppose, if node2 was already up and running... and then i bring up node 1 and start submitting commands from node1, then everything seems to work fine ... But then if i stop node2, node1 errors out with the same error.

NOTE: i am currently trying with coherence jar from OTN .. I earlier tried using 12.1.3 coherence jar but that seems to have more issues ... Besides the above error, I see that when any node stops in the cluster, i see partitionservice related errors in other running nodes..

brianoliver commented 10 years ago

@arif.iqbal said: Testcase details . (Please refer to my earlier email for the testcase jar )

Scenario 1

  1. First run TestPublisher.java from a terminal. The code tries to submit a command using a pre-existing command contexts.

  2. While Testpublisher is running, start TestConsumer.java from another terminal.. For a test case point of view, it just brings up another node in coherence cluster...

  3. After some time you will observe errors in 1st terminal

Scenario 2

  1. Start TestConsumer.java first in a terminal 1
  2. Then in another terminal 2, run TestPublisher.java
  3. Everything works fine this time ..
  4. Now stop TestConsumer.java.
  5. After some time you will observe errors in 1st terminal
brianoliver commented 10 years ago

@brianoliver said: The event-interceptor for the command contexts was declared in the wrong place to capture the appropriate transfer events.

brianoliver commented 8 years ago

@brianoliver said: This possibly occurs in Incubator 11, so re-opening to test

brianoliver commented 8 years ago

This issue was imported from JIRA COHINC-100

brianoliver commented 10 years ago

Reported by arif.iqbal