Bill Farner created AURORA-134:
----------------------------------

             Summary: LogStorage store implementations internally invoke write
                 Key: AURORA-134
                 URL: https://issues.apache.org/jira/browse/AURORA-134
             Project: Aurora
          Issue Type: Bug
          Components: Scheduler
            Reporter: Bill Farner
            Priority: Minor


{{LogStorage}} implements all of the *Store interfaces, and is the outer-most 
implementation provided to callers throughout the scheduler (it delegates to 
MemStorage).  We recently noticed that {{LogStorage}} implements all mutating 
store methods by immediately invoking write()., which is odd since external 
callers should only gain access to these methods by first invoking write().  
This has the outcome of an additional write() call for all mutate operations.  
For example:

{code}
storage.write(new MutateWork.NoResult.Quiet() {
  @Override protected void execute(MutableStoreProvider storeProvider) {
    for (xx) {
      storeProvider.getAttributeStore().saveHostAttributes(..);
    }
  }
});
{code}

If the inner {{for}} loop executes N times, this block of code ends up invoking 
LogStorage.write N+1 times because of this behavior.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to