/* * 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?