change node field value without node->save or without causing hook_entity_presave infinite loop Have CONTENT_TYPE_NAME with field_counter that the user can set when editing a node.  If a user edits and updates that field I want all other nodes that have this field set (to an equal or higher value) to increment their values by 1.  I am overriding hook_entity_presave for this purpose.
As you can see in the following code I am getting all nodes of the same content type using entityQuery exluding the node that was about to be saved.  For all the nodes found I am getting the entity and incrementing the field value by 1 and setting the field value and saving the node.
    function MY_MODULE_entity_presave(EntityInterface $entity){ 
      if ($entity-&gt;getEntityType()-&gt;id() == 'node') {
        $changed_field = array(
            &quot;field_counter&quot;,
        );
        $nid = $entity-&gt;id();
        foreach($changed_field as $field ){
          $value = $entity-&gt;{$field}-&gt;value;
          if(isset($value) &amp;&amp; $value !=&quot;&quot;){
            MY_MODULE_change_field_value($field,$value,$nid);
            //...
          }
        }
      }
    }

    function MY_MODULE_change_field_value($field,$value,$xeid){  
      $query = \Drupal::entityQuery('node')
        -&gt;condition('status', 1)
        -&gt;condition('type', 'CONTENT_TYPE_NAME')
        -&gt;condition('nid', $xeid,&quot;&lt;&gt;&quot;)
        -&gt;condition($field,$value,&quot;&gt;=&quot;);

      $nids = $query-&gt;execute();

      foreach ($nids as $nid) {
        $node = \Drupal\node\Entity\Node::load($nid);
        //or
        //$node = \Drupal::entityTypeManager()-&gt;getStorage(&quot;node&quot;)-&gt;load($nid);
         
        $old_value = $node-&gt;{$field}-&gt;value;
        $old_value++;
        $node-&gt;{$field}-&gt;value = $old_value;
        
        $node-&gt;save();    
      }
    }

This code works with but has a problem. All nodes updated programmatically will call entity_presave again and cause an infinite loop.
I did not find a way to update field value without calling node-&gt;save() if there is a way please let me know (I know there was a way in drupal 7 field_attach_update which is deprecated as of 8.0.x I think)
Is there a way to call node-&gt;save() which does not call hook_entity_presave ?
or alternativelly what checks can I do in the hook_entity_presave to know if the field was just updated programmatically and not from user edit ?
I think I have found a simple solution 

add revision message with UNIQUE string before saving the node

    //...
    $node-&gt;setNewRevision(TRUE);
    $node-&gt;revision_log-&gt;value = "AUTOMATED-UPDATE ". $field." incremented to ".$old_value ;
    $node-&gt;save();


check on the hook_entity_presave that the revision was not AUTOMATED by checking in the log for our UNIQUE string

    if ($entity-&gt;getEntityType()-&gt;id() == 'node') {
        $log = $entity-&gt;revision_log-&gt;value;
        if( substr( $log, 0, 16 ) === "AUTOMATED-UPDATE" )
            return;
        ...