You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/24 11:49:04 UTC

[GitHub] [pulsar] javard opened a new issue #6813: Function gets stuck in the context.getState() method

javard opened a new issue #6813:
URL: https://github.com/apache/pulsar/issues/6813


   **Description**
   When using the method *context.getState()* two times in a row sometimes it gets stuck in one of calls. When this happens and the function is restarted, the function always gets stuck launching (I think it can't connect to the bookkeeper) and Pulsar needs to be restarted. 
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Multiple producers writing to *topic1* 
   2. Function inputs *topic1* and outputs to *topic2*
   3. Function executes (in this order) :
   3.1. *context.getState("key1")* and *context.getState("key2")* consecutively
   3.2. *context.putState("key2")* and *context.putState("key1")* consecutively
   3.3. returns a message
   
   **Expected behavior**
   *topic2* receives all the messages sent to *topic1*.
   
   **Desktop:**
    - OS: Ubuntu 19.10 64-bit
    - CPU: Intel® Core™ i7-4770HQ CPU @ 2.20GHz × 4 
    - Memory: 10.5 GiB
   
   **Additional context**
   Pulsar version: 2.5.0
   Command used to launch the function:
   `./pulsar-admin functions localrun --jar path/to/jar/functions.nar --classname org.class.name.DummyFunction --tenant admin-tenant --namespace CHM --name dummy-function --inputs persistent://admin-tenant/CHM/topic1 --output persistent://admin-tenant/CHM/topic2 --processing-guarantees ATLEAST_ONCE --state-storage-service-url bk://localhost:4181 --broker-service-url pulsar://localhost:6650`
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] javard commented on issue #6813: Function gets stuck in the context.getState() method

Posted by GitBox <gi...@apache.org>.
javard commented on issue #6813:
URL: https://github.com/apache/pulsar/issues/6813#issuecomment-619897031


   @sijie I think it's enabled. When I run in localrun without the flag `--state-storage-service-url` it throws the exception `java.lang.IllegalStateException: State is not enabled`.
   But setting the flag (`--state-storage-service-url bk://localhost:4181`) the state storage works.
   what is the correct way to enable the state storage?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijie commented on issue #6813: Function gets stuck in the context.getState() method

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6813:
URL: https://github.com/apache/pulsar/issues/6813#issuecomment-619662234


   @javard did you enable bookkeeper state storage?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org