Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81216

ASSERT_OK on a StatusWith<T> assertion failed logging is unreadable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2023-10-02
    • 11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ASSERT_OK properly asserts whether a StatusWith<T> is OK or not, but when an assertion fails it will log an unreadable message.

      e.g.

      Expected ::mongo::Status::OK() == (m) (OK  == [mongo::StatusWith<mongo::Message>=a0 22 42 2a 78 7f 00 00 00 a5 03 37 78 7f 00 00 00 01 62 10 fe 7f 00 00]) @src/mongo/transport/grpc/grpc_transport_layer_test.cpp:242
      

      We should update this to log the message an ASSERT_OK on a non-OK Status would.

      e.g.

      Expected ::mongo::Status::OK() == (m.getStatus()) (OK  == CallbackCanceled foo) @src/mongo/transport/grpc/grpc_transport_layer_test.cpp:242
      

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: