Inconsistent naming between isChangeStreamQuery and isChangeStreamCursor

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      There is a naming inconsistency between two related symbols that both express the concept of "this operation/cursor is for a change stream".

      Background

      In src/mongo/s/query/planner/cluster_find.cpp (around lines 1080-1081), the following assignment appears:

      CurOp::get(opCtx)->debug().isChangeStreamQuery =
          pinnedCursor.getValue()->isChangeStreamCursor();
      

      The left-hand side field (OpDebug::isChangeStreamQuery) uses the suffix Query, while the right-hand side method (ClusterClientCursor::isChangeStreamCursor()) uses the suffix Cursor. Both refer to the same concept but with different terminology, which makes the code harder to read and understand.

      Scope of Work

      Rename one of the two symbols so that the naming is consistent across the codebase. Options:

      • Rename OpDebug::isChangeStreamQuery -> OpDebug::isChangeStreamCursor (and update all references), or
      • Rename ClusterClientCursor::isChangeStreamCursor() -> ClusterClientCursor::isChangeStreamQuery() (and update all references).

        Acceptance Criteria

      • Both symbols use the same suffix (either Query or Cursor) throughout the codebase.

            Assignee:
            Unassigned
            Reporter:
            Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: