Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4576

Coverity warning in conn_capacity.c

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT3.2.0, 4.0.7, 4.1.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage Engines 2019-02-25
    • v4.0

      Coverity issue:

      446        if (res_value > now_ns) {
      447                sleep_us = (res_value - now_ns) / WT_THOUSAND;
      448                if (res_value == res_total_value)
      449                        WT_STAT_CONN_INCRV(session,
      450                            capacity_time_total, sleep_us);
         	cond_const: Condition type == WT_THROTTLE_CKPT, taking false branch. Now the value of type is equal to 3.
      451                else if (type == WT_THROTTLE_CKPT)
      452                        WT_STAT_CONN_INCRV(session,
      453                            capacity_time_ckpt, sleep_us);
      454                else if (type == WT_THROTTLE_EVICT)
      455                        WT_STAT_CONN_INCRV(session,
      456                            capacity_time_evict, sleep_us);
      457                else if (type == WT_THROTTLE_LOG)
      458                        WT_STAT_CONN_INCRV(session,
      459                            capacity_time_log, sleep_us);
         	const: At condition type == WT_THROTTLE_READ, the value of type must be equal to 3.
         	
      CID 111026 (#1 of 1): Redundant test (DEADCODE)
      dead_error_condition: The condition type == WT_THROTTLE_READ must be true.
      460                else if (type == WT_THROTTLE_READ)
      461                        WT_STAT_CONN_INCRV(session,
      462                            capacity_time_read, sleep_us);
      463                if (sleep_us > WT_CAPACITY_SLEEP_CUTOFF_US)
      464                        /* Sleep handles large usec values. */
      465                        __wt_sleep(0, sleep_us);
      

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: