Read operations should always go to the "current" owners.
339322
public ConsistentHash getReadConsistentHash() {
      switch (phase) {
         case CONFLICT_RESOLUTION:
         case NO_REBALANCE:
            assert pendingCH == null;
            assert unionCH == null;
            return currentCH;
         case TRANSITORY:
            return pendingCH;
         case READ_OLD_WRITE_ALL:
            assert pendingCH != null;
            assert unionCH != null;
            return currentCH;
         case READ_ALL_WRITE_ALL:
            assert pendingCH != null;
            return unionCH;
         case READ_NEW_WRITE_ALL:
            assert unionCH != null;
            return pendingCH;
         default:
            throw new IllegalStateException();
      }
   }
676835
def current_reading(self) -> Optional[Union[int, float]]:
        """"""
        return self._get_field_value(SpecialDevice.PROP_CURRENT_READING)
483958
def owner(self, pathobj):
        
        stat = self.stat(pathobj)

        if not stat.is_dir:
            return stat.modified_by
        else:
            return 'nobody'
398616
def get_owner(self, default=True):
        
        uid, gid = self.owner

        if not uid and default:
            uid = os.getuid()

        if not gid and default:
            gid = os.getgid()

        return uid, gid
207690
def obj_in_list_always(target_list, obj):
    
    for item in set(target_list):
        if item is not obj:
            return False
    return True
372248
def is_current_manager_equals_to(cls, pm):
        """"""
        if hasattr(cls, 'works_result'):
            return cls.works_result
        is_ok = bool(cls._try_get_current_manager() == pm)
        setattr(cls, 'works_result', is_ok)
        return is_ok
674394
public function always($result, $payload, Delivery $delivery, AbstractListener $listener, Exception $exception = null)
    {
        if ($exception) {
            throw $exception;
        }
    }
51354
def get_owners(self):
        
        response = self._client.session.get(
            '{url}/list/owners'.format(url=self.endpoint_url)
        )
        return self.process_response(response)
640793
def owned(self):
        
        stored_token = self.redis.get(self.name)
        # need to always compare bytes to bytes
        # TODO: this can be simplified when the context manager is finished
        if stored_token and not isinstance(stored_token, bytes):
            encoder = self.redis.connection_pool.get_encoder()
            stored_token = encoder.encode(stored_token)
        return self.local.token is not None and \
            stored_token == self.local.token
476103
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            MoveOnValidHandler moveBehavior = null;
            m_record.setOpenMode(m_record.getOpenMode() | DBConstants.OPEN_CACHE_RECORDS);    // Cache recently used records.
            
            m_bMoveBehavior = false;    // This flag is set automatically if the Valid record listener has to be used
            
            ReadSecondaryHandler listenerDup = (ReadSecondaryHandler)this.getOwner().getListener(this.getClass());
            while ((listenerDup != this) && (listenerDup != null))
            {
                if (listenerDup.getRecord() == this.getRecord())
                    if (listenerDup.getActualKeyArea() == this.getActualKeyArea())
                {
                    listenerDup.setRecord(null);
                    this.getOwner().removeListener(listenerDup, true); // Make sure there is only one
                    break;
                }
                listenerDup = (ReadSecondaryHandler)listenerDup.getListener(this.getClass());
            }
            
            this.fieldChanged(DBConstants.DISPLAY, DBConstants.READ_MOVE);    // SCREEN_MOVE says this is coming from here

            if (owner instanceof ReferenceField)
            {
                m_keyField = m_record.getKeyArea(keyAreaName).getField(DBConstants.MAIN_KEY_FIELD);   // Handle field (note - null keyAreaName -> counter field)
                moveBehavior = new MoveOnValidHandler(((BaseField)owner), m_keyField, null, true, true);        // Its okay to sync the key with references
                m_keyField = null;
            } 
            else
            {
                MainReadOnlyHandler listener = new MainReadOnlyHandler(keyAreaName);
                m_keyField = m_record.getKeyArea(keyAreaName).getField(DBConstants.MAIN_KEY_FIELD);
                m_keyField.addListener(listener); //    Make sure this field has the BaseListener to read it's file
                    // Make sure you move the key field to this field!!
                moveBehavior = new MoveOnValidHandler(((BaseField)owner), m_keyField, null, false, true);
            } 
            m_record.addListener(moveBehavior);
        }
        else
        {
            if (m_bCloseOnFree) if (this.getDependentListener() != null) // If close and file is still open
            {
                this.setDependentListener(null);    // If case you want to delete me!
                if (m_record != null)
                    m_record.free();  // File is still open, and my listener is still there, close it!
            }
            m_record = null;
            m_keyField = null;
        }
    }
98998
private void resolveRemainingToCurrent()
    {
        for (int i = 0; i < this.size; i++) {
            if (sourceRevisions.get(i) == null) {
                sourceRevisions.set(i, currentRevision);
            }
        }
    }
1053124
def _take_ownership(self):
        

        if self:
            ptr = cast(self.value, GIBaseInfo)
            _UnrefFinalizer.track(self, ptr)
            self.__owns = True
208346
def do_read(self, args):
        """"""

        if not self.current:
            print('There are no resources in use. Use the command "open".')
            return

        try:
            print(self.current.read())
        except Exception as e:
            print(e)
1343743
public boolean addReader(TransactionImpl tx, Object obj)
    {
        checkTimedOutLocks();

        Identity oid = new Identity(obj,getBroker());
        LockEntry reader = new LockEntry(oid.toString(),
                tx.getGUID(),
                System.currentTimeMillis(),
                LockStrategyFactory.getIsolationLevel(obj),
                LockEntry.LOCK_READ);

        addReaderInternal(reader);
        return true;
    }
375764
private boolean ownerCanReadTable(String ownerId, String table) {
        return _internalAuthorizer.hasPermissionById(ownerId, getReadPermission(table));
    }
1068056
def p_always(self, p):
        ''
        p[0] = Always(p[2], p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
633022
public boolean isOwnedBy(String possibleOwner) {
        boolean retval = false;
        if (this.owner != null) {
            retval = (this.owner.compareTo(possibleOwner) == 0);
        }
        return retval;
    }