elastic / ruby-lumberjack

Ruby lumberjack protocol, contains both client and server
Other
4 stars 17 forks source link

Change how we calculate the window size. #9

Closed ph closed 9 years ago

ph commented 9 years ago

Window size was incorrectly caculated on the server side. Causing the sequence number to be out of sync with the LSF, we were using the first sequence number of a transmission to actually ack a whole transmission.

Also removed the window_size option in the ruby client, because it doesn't reflect the actual behavior of the ruby client. The client doesn't do any buffering before transmitting the payload, so the client should ack every send to not lose events.

ph commented 9 years ago

@jordansissel Added a #write bulk for the ruby client, also added a few examples concerning the for out of sync sequences.

ph commented 9 years ago

I'll add a test to check the if the sequence roll over affect the next ack logic.

ph commented 9 years ago

Applied code review, also change the code to make sure the test are randomly executed.

jordansissel commented 9 years ago

LGTM. Tests passing.

jordansissel commented 9 years ago

@ph can you squash this before merging?

ph commented 9 years ago

squash into 2 commits, I think it make more sense that way.

elasticsearch-bot commented 9 years ago

Merged sucessfully into master!