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

Collmod returns { ok: true } instead of { ok: 1 } in v8.0, breaking backward compatibility

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • 2

      The problem
      The ticket introduced a regression from v7.0 to v8.0. A response { ok : true } is returned for collmod as opposed to {ok : 1 } in v7.0.  A client discovered the problem after an upgrade, expecting specifically { ok : 1 }. 
      Our testing infrastructure doesn't capture the problem as "ok: true" is parsed correctly by the javascript drivers to check when a command worked.

      The cause
      SERVER-84560 added this helper  to forward to the user specific errors related to collmod for index changes after running on the participants. The helper is attaching { ok : true } at every response when no issues are present.

      Solution
      An easy fix here would be to forward the response only when there's an error, that would delegate the shardsvr command to attach { ok : 1 } when the coordinator succeeds.

            Assignee:
            Unassigned Unassigned
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: