Skip to content
Snippets Groups Projects

Draft: Memory reconnects

Open Rainer Kartmann requested to merge memory-reconnect into master
1 unresolved thread

Closes #80

Merge request reports

Approval is optional
Merge blocked: 2 checks failed
Merge request must not be draft.
Merge conflicts must be resolved.

Merge details

  • The source branch is 2234 commits behind the target branch.
  • 6 commits and 1 merge commit will be added to master.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Rainer Kartmann assigned to @RainerKartmann

    assigned to @RainerKartmann

    • Author Maintainer

      I implemented a small test scenario memory_reconnect_test with a memory_reconnect_test_client and a memory_reconnect_test_server. You can start it together with the ArMemCore scenario (which starts the MNS etc).

      The server is just an empty memory server with a name.

      The client gets a reader to the server and performs n queries at a given frequency

      You can configure the client:

      • Whether it should use getReader() or useReader() (property addDependency)
      • Whether it should stop queries after a disconnect (property stopQueriesOnDisconnect)
      • Whether the query task should be restarted after a reconnect (though this shouldn't have any effect)
      • The number of queries (queries.num). Use -1 for infinite.
      • The frequency of queries (queries.frequency)

      For example, you can set to infinite queries (-1) at 20 Hz and observe what happens when you stop the server.

      I observed the following behaviors:

      • add dependency / stop at disconnect (restart at reconnect has no effect as task is always stopped)
        • One query fails the moment the server disconnects (indicated by result.success == false) and queries stop
        • After server restart, queries start again
        • Repeat
      • add dependency / no stop at disconnect / restart at reconnect
        • One query fails before the component disconnects.
        • After the disconnect (before the reconnect), all further queries fail (result.success == false)
        • After a reconnect, and after the query thread was restarted, the queries succeed again
      • add dependency / no stop at disconnect / no restart at reconnect
        • Same as with restart at reconnect
      • no dependency (no disconnects)
        • After the server stops, all queries fail.
        • When the server is back online, the queries continue to fail (same error). This is not optimal.

      So:

      • We need to recreate the proxies/readers after reconnecting to the server; the old proxy objects are not valid anymore.
      • If this is done in onConnect(), and you use the server, this should be fine; given that your code can handle failed queries and the re-setup.
      • If you just get a client and the server is gone, you will currently loose connection and not regain it.
      Edited by Rainer Kartmann
    • Author Maintainer

      @dreher @fabian.reister

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

Please register or sign in to reply
Loading