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

Avoid IndexBuildAborted error code to convey state information

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • Fully Compatible
    • Execution EMEA Team 2023-06-26, Execution EMEA Team 2023-07-10

      After SERVER-76935 kExternalAborted index build state indicates that the caller is responsible for the abort. Still, there are some left over places where we could remove use of IndexBuildAborted.

      https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/index_builds_coordinator_mongod.cpp#L761

      https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/index_builds_coordinator.cpp#L3347

      Maybe we could even just pass the default Interrupted error code in killOp

      https://github.com/10gen/mongo/blob/b32042b0dc2f06a56356eb6a6864394b4af46069/src/mongo/db/repl_index_build_state.cpp#L551


      Original description:

      We use IndexBuildAborted to signal to the index builder thread that "the caller is taking responsibility for aborting this index build, do not cleanup". Instead, we should use the ReplIndexBuildState we already pass around and store this information on that structure, rather than using a special error code.

            Assignee:
            yujin.kang@mongodb.com Yujin Kang Park
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: