Skip to content

Client isn't equipped to handle requests/responses concurrently #2

@djdv

Description

@djdv

Pulling this issue out from: djdv/go-filesystem-utils#40
Making multiple requests concurrently causes the client to mix up responses and send them out of order.
E.g.

2023/11/21 13:21:51 [TRACE] request: RPC #4290061661 (nfs.Lookup)
2023/11/21 13:21:51 [TRACE] request: RPC #4290061662 (nfs.Lookup)
err on: Qmc2fSA6chjZMbXRi7JGQZ7tXEmDbtG2XF9FXRLCtGLBQV [] xid did not mat ch, expected: ffb5255e, received: ffb5255d
err on: Qmc2fSA6chjZMbXRi7JGQZ7tXEmDbtG2XF9FXRLCtGLBQV [] xid did not mat ch, expected: ffb5255d, received: ffb5255e

Users can work around this problem by synchronizing themselves client side (such as with a mutex).
However, this detail should likely be documented, and ideally resolved.

For me, it was confusing because the sibling server library does appear to handle its operations concurrently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions