Set should_forward_to_shards for rawData generic argument

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.3.0-rc0
    • Component/s: None
    • None
    • Networking & Observability
    • 0
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The rawData generic argument introduced by SERVER-100690 is declared as should_forward_to_shards: false, even though this argument should be forwarded to shards. Instead, it is forwarded to shards manually by parsing it on ingress and serializing it on egress.

      This can cause an explicitly set rawData argument to be silently removed. For example, when dispatching an pipeline to shards with rawData set on the AggregateCommandRequest, the code for targeting the pipeline will strip the argument via CommandHelpers::filterCommandRequestForPassthrough, resulting in the outgoing network request not having rawData set (unless it was also set on the OperationContext decoration that is used for manual propagation).

      We should set should_forward_to_shards: true so that an explicitly set rawData: true command argument is preserved. The difficulty is that if both the command and the OperationContext have rawData set, it will be duplicated on the outgoing network request by the egress hook resulting in a failure. Ideally the RPC API should offer a way to resolve those conflicts.

              Assignee:
              Unassigned
              Reporter:
              Joan Bruguera Micó
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: