Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-876

PUT request invoked on paused infinispan server will appear later when it is running again

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      There are 2 scenarios to reproduce it:
      The first scenario

      1.

      $ git clone https://github.com/mirostary/simple-infinispan.git
      $ cd simple-infinispan
      $ docker run --rm -it --name simple-infinispan -e USER="test" -e PASS="test" -p 11222:11222 infinispan/server:latest
      $ mvn clean install quarkus:dev
      $ curl -X PUT http://localhost:8080/counter/increment-counters
      $ curl -X GET http://localhost:8080/counter/get-client // 1
      $ curl -X GET http://localhost:8080/counter/get-cache  // 1
      $ docker pause simple-infinispan
      $ curl -X PUT http://localhost:8080/counter/increment-counters

      2. It will get stuck but the "get-client" counter will be "2"

      3. Interrupt the PUT request
      4.

      $ docker unpause simple-infinispan
      $ curl -X GET http://localhost:8080/counter/get-cache // 2

       

      The second scenario

      The same steps 1, 2, 3, and then

      $ curl -X GET http://localhost:8080/counter/get-cache
      $ docker unpause simple-infinispan

      the "get-cache" is 1

      $ curl -X GET http://localhost:8080/counter/get-cache // 2

      but when I call it again (without anything else) it is 2

       

      Show
      There are 2 scenarios to reproduce it: The first scenario 1. $ git clone https: //github.com/mirostary/simple-infinispan.git $ cd simple-infinispan $ docker run --rm -it --name simple-infinispan -e USER= "test" -e PASS= "test" -p 11222:11222 infinispan/server:latest $ mvn clean install quarkus:dev $ curl -X PUT http: //localhost:8080/counter/increment-counters $ curl -X GET http: //localhost:8080/counter/get-client // 1 $ curl -X GET http: //localhost:8080/counter/get-cache // 1 $ docker pause simple-infinispan $ curl -X PUT http: //localhost:8080/counter/increment-counters 2. It will get stuck but the "get-client" counter will be "2" 3. Interrupt the PUT request 4. $ docker unpause simple-infinispan $ curl -X GET http: //localhost:8080/counter/get-cache // 2   The second scenario The same steps 1, 2, 3, and then $ curl -X GET http: //localhost:8080/counter/get-cache $ docker unpause simple-infinispan the "get-cache" is 1 $ curl -X GET http: //localhost:8080/counter/get-cache // 2 but when I call it again (without anything else) it is 2  

      If Quarkus application invokes a PUT request on the down Infinispan server, the request appears later when the server is running again.

      The behavior is unexpected because the cache changes (or the request is processed) even after the client closed the connection, mainly it is a problem when running in OpenShift environment, where the request times out after 30 seconds (default setting openshift-router), and yet there this request remains and is processed after the Datagrid is connected (which may be beyond the control of the application administrator, eg. in case of disconnecting the node).

      I've prepared a simple application to reproduce it - https://github.com/mirostary/simple-infinispan.git

              karestig@redhat.com Katia Aresti
              mstary@redhat.com Miroslav Starý (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: