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

Flow control could be activated by no-op writes

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Workload Scheduling
    • ALL
    • Show
      https://github.com/10gen/mongo/pull/22486

      We determine here whether we should turn flow control on based on the lag between lastApplied and lastCommitted, and whether enough operations happened between these timestamps to try and ignore any lag from the NoopWriter.
      The approximateOpsBetween function relies on operations that we have sampled (default every 1000 ops from flowControlSamplePeriod). It seems like as long as we sample an operation after the lastCommittedTs, we will set prevApplied to a value != -1. As a result, we will also set currApplied to a value != -1 and as a result return a value != -1.
      Combined with enough of lag between lastApplied and lastCommitted, this would turn flow control on.

      This can be seen in flow_control_logging.js where the sampling period is set to be very small, but I was also able to reproduce this (linked in comment) with the default sampling period of 1000 ops.

      Based on the original comment on flow control re: no-op writes, it seems like we should fix flow control to ignore no-op writes better.

            Assignee:
            Unassigned Unassigned
            Reporter:
            huayu.ouyang@mongodb.com Huayu Ouyang
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: