> On Aug. 7, 2015, 10:22 p.m., Maxim Khutornenko wrote: > > src/main/java/org/apache/aurora/scheduler/storage/db/DbStorage.java, line > > 143 > > <https://reviews.apache.org/r/37141/diff/1-2/?file=1032851#file1032851line143> > > > > Hmm, can we use LogStorage writeLock.getHoldCount() instead? It could > > potentially wrap MutateWork into a new anonymous instance pushing lock > > count downstream. Or would it be too much? > > Bill Farner wrote: > For what purpose? That seems like a pretty significant encapsulation > violation, and couples this implementation to LogStorage where it is > otherwise independent.
It's just that ThreadLocal opens up a new chapter (and not a good one) in our design patterns. I agree MutateWork wrapping isn't ideal either but it would at least consolidate around the synchronization point. Anyway, just a thought, I don't feel strongly about it. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37141/#review94585 ----------------------------------------------------------- On Aug. 7, 2015, 1:35 p.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37141/ > ----------------------------------------------------------- > > (Updated Aug. 7, 2015, 1:35 p.m.) > > > Review request for Aurora and Maxim Khutornenko. > > > Bugs: AURORA-1395 > https://issues.apache.org/jira/browse/AURORA-1395 > > > Repository: aurora > > > Description > ------- > > Two loose ends from r/37049: > - An extra @Transactional which rendered the inner transaction useless, and > results in async work still being performed within the transaction. > - No handling for reentrant calls to write(), causing async work to be > flushed in inner calls and before the transaction actually completes. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/storage/db/DbStorage.java > aac62e2bbc212f61e61ffca75753ef06f1701ea4 > src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java > 3b05db9481edc7a82c0823cf50793c7d12384541 > > Diff: https://reviews.apache.org/r/37141/diff/ > > > Testing > ------- > > > Thanks, > > Bill Farner > >