Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Make remote reads asynchronous #3633

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Oct 18, 2024

  1. Feature: daemons: execd should read remote client messages async.

    Instead of calling pcmk__read_remote_message, which blocks, use
    pcmk__read_available_remote_data instead.  This function will attempt to
    read a message but if the other side of the connection isn't ready or
    doesn't give us the complete message, we'll go back to the main loop and
    try again later instead of block.
    
    Additionally, clean up the code formatting a little bit and make the
    error messages more helpful.
    
    Related T855
    clumens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    fe393d7 View commit details
    Browse the repository at this point in the history
  2. Refactor: daemons: execd shouldn't call pcmk__remote_message_xml in a…

    … loop.
    
    There can only ever be one message in the buffer, so the loop here will
    always return NULL the second time.  Simplifying this code doesn't
    actually change anything, but I think it makes it easier to understand
    what is going on.
    clumens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    c369085 View commit details
    Browse the repository at this point in the history
  3. Refactor: liblrmd: Move notify triggers into their own handler.

    This splits the process_pending_notify part out of lrmd_tls_dispatch.
    The latter function was really doing two things at once, which makes it
    confusing.  Instead split the two event sources into two different
    handlers.
    clumens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    910b822 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e4bf8f View commit details
    Browse the repository at this point in the history
  5. Feature: lrmd: Add lrmd_tls_dispatch_async.

    This is just like lrmd_tls_dispatch except that it uses
    pcmk__read_available_remote_data to read data.
    
    Related T855
    clumens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    7f0d325 View commit details
    Browse the repository at this point in the history
  6. Refactor: libcrmcommon: Simplify pcmk__read_available_remote_data.

    Get rid of the received variable and just make this a couple if blocks.
    It's a little easier to follow this way.
    clumens committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    e78786d View commit details
    Browse the repository at this point in the history