> On March 18, 2014, 7:19 p.m., Jie Yu wrote: > > src/state/log.cpp, line 377 > > <https://reviews.apache.org/r/19007/diff/1/?file=515951#file515951line377> > > > > Maybe not for this review. We enqueue a truncate operation for each > > set/expunge. As a result, multiple truncate operations can get queued. > > IIUC, consecutive truncate operations seems to be wasteful as only the > > first one has an effect, right? > > > > I understand the current code won't cause any log layer operation as > > you remember the 'truncated' field. But acquiring/releasing mutex is also > > expensive as it prevents set/expunge from being executed. > > > > Maybe we should consider doing the following: if there is a truncate > > operation pending, do not enqueue another truncate?
There is already a TODO for that above the definition of 'LogStorageProcess::truncate()'! ;) - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19007/#review37576 ----------------------------------------------------------- On March 31, 2014, 7:11 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19007/ > ----------------------------------------------------------- > > (Updated March 31, 2014, 7:11 a.m.) > > > Review request for mesos, Ben Mahler and Jie Yu. > > > Repository: mesos-git > > > Description > ------- > > This is a combination of both https://reviews.apache.org/r/17423 and > https://reviews.apache.org/r/17424 which have been merged to make it easier > to make changes. > > > Diffs > ----- > > src/Makefile.am 47d03b393f68ebd4e9eba3206798a939078023c0 > src/messages/state.proto 7f7a8a505d6f24b01fec0c3ad47b0e15b2b17ffa > src/state/log.hpp PRE-CREATION > src/state/log.cpp PRE-CREATION > src/tests/state_tests.cpp d0e084070c566ee7d751a8e1279772e05b966145 > > Diff: https://reviews.apache.org/r/19007/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
