code: private void update() {
          synchronized (lock) {
              if (!observing) { return; }
  
              try {
                  Log.i(DOMAIN, "%s: Querying...", this);
                  final ResultSet oldResultSet = resultSet;
                  final ResultSet newResultSet = (oldResultSet == null) ? query.execute() : oldResultSet.refresh();
  
                  willUpdate = false;
                  lastUpdatedAt = System.currentTimeMillis();
  
                  if (newResultSet != null) {
                      if (oldResultSet != null) { Log.i(DOMAIN, "%s: Changed!", this); }
                      resultSet = newResultSet;
                      changeNotifier.postChange(new QueryChange(this.query, resultSet, null));
                  }
                  else {
                      Log.i(DOMAIN, "%s: ...no change", this);
                  }
              }
              catch (CouchbaseLiteException e) {
                  changeNotifier.postChange(new QueryChange(this.query, null, e));
              }
          }
      }
docs: NOTE: update() method is called from only ExecutorService for LiveQuery which is
  a single thread. But update changes and refers some instant variables