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

Investigate whether a read barrier is needed in hazard.c

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

          /*
           * Check if the page state is still valid, where valid means a state of WT_REF_MEM.
           */
          current_state = ref->state;
          if (current_state == WT_REF_MEM) {
              ++session->nhazard;
      
              /*
               * Callers require a barrier here so operations holding the hazard pointer see consistent
               * data.
               */
              WT_READ_BARRIER();
              return (0);
          }
      

      There's a weird read barrier in this code. We should investigate whether it is valid. If it's valid, should we move it to the caller instead of here?

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: