> On Feb. 10, 2017, 10:14 p.m., Darrel Schneider wrote: > > geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java, line > > 5267 > > <https://reviews.apache.org/r/56506/diff/1/?file=1628630#file1628630line5267> > > > > I don't like that if this code retries it keeps seeking back in the > > file and possible rewrites bytes it already wrote. > > > > I also don't like that the old code did not check for all the data to > > have been written. > > > > Lets talk about this one.
I had gone back and forth the patch in this method. After discussion, I've pulled out the fix, and reverted to the original code for the method. Also removed the tests for this part of the fix. There is still a potential problem in this method, in that unlike in write(ByteBffer), the results (number of bytes written) of channel.write(ByteBuffer[]) is not checked, it is assumed to write everything. I will file a new Jira for this issue. - Ken ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56506/#review165186 ----------------------------------------------------------- On Feb. 11, 2017, midnight, Ken Howe wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56506/ > ----------------------------------------------------------- > > (Updated Feb. 11, 2017, midnight) > > > Review request for geode, anilkumar gingade and Darrel Schneider. > > > Repository: geode > > > Description > ------- > > Implemented limited retries in two forms of Oplog.flush() when > channel.write() is called. > If write() returns bytes witten less than the change in the ByteBuffer > positions, then reset > buffer positions and re-try writing for a limited number of times. Throws > IOException if the write doesn't succeeded after a few retries (max > number of retries is defined by a static). > > Added new unit tests. > > > Diffs > ----- > > geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java 0b98364 > > geode-core/src/test/java/org/apache/geode/internal/cache/OplogFlushTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/56506/diff/ > > > Testing > ------- > > Started precheckin > > > Thanks, > > Ken Howe > >