Reduce coupling around Shared Message Buffer #16

merged 8 commits into from Nov 23, 2012


None yet

1 participant


Separate the compression from the buffer management. Decouple TSOSharedMessageBuffer from client channels.

Added tests for the compression in isolation.

@dgomezferro dgomezferro commented on an outdated diff Jul 18, 2012
+ if (!(obj instanceof ReadingBuffer))
+ return false;
+ ReadingBuffer buf = (ReadingBuffer) obj;
+ return;
+ }
+ }
+ public ReadingBuffer getReadingBuffer(ChannelHandlerContext ctx) {
+ ReadingBuffer rb = new ReadingBuffer(ctx);
+ readingBuffers.add(rb);
+ return rb;
+ }
+ public void writeCommit(long startTimestamp, long commitTimestamp) {
+ if (writeBuffer.writableBytes() < 30) {
dgomezferro Jul 18, 2012 Contributor

We should improve this (add a function and use a constant instead of "30")

dgomezferro and others added some commits Jul 19, 2012
@dgomezferro dgomezferro Address comment from Artyom 56e2a4c
@dgomezferro dgomezferro Remove readingBuffers on client disconnects
Fix #21
@dgomezferro dgomezferro Fix bug during SharedMessageBuffer flushes
If a client was still on the past buffer, it would only receive the deltaSO from the currentBuffer.
Added a regression test as well.
Daniel Gómez Ferro Fix reference to new CleanedTransactionReport msg 12d2337

I've fixed a minor issue, all tests pass now. I ran a quick benchmark and couldn't notice a slowdown, I'm going to merge this and we can focus on performance later on.

@dgomezferro dgomezferro merged commit f6f7b87 into yahoo:master Nov 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment