Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part number and parts count added #27

Closed
wants to merge 1 commit into from

Conversation

vadzay
Copy link

@vadzay vadzay commented Apr 17, 2014

Hello!

In some cases when tailer splits line in parts there is no way to find out if I received part of message or whole message if len(line.Text) == tail.MaxLineSize.

I've added part number and total parts to each message sent to tail.Lines channel.

@srid
Copy link
Contributor

srid commented Apr 25, 2014

thanks for the pull request.

i took a look at the diff, and don't feel very sure about adding this. generally i like to keep the Line struct smaller, which would make sense if you are transferring say millions of lines as part of some log streaming application. the two int64 fields you added -- PartNum and Parts -- are going to be empty most of the time (as it is uncommon for lines to be very long), thus wasting so much space in any app that is dealing with large streams of logs.

you can reduce that to just one field continuation bool that indicates whether a line is a continuation of the previous line, but still - i wonder if we can do away with that as well.

@Nino-K
Copy link
Contributor

Nino-K commented Dec 3, 2015

@vadzay I agree with @srid going to close this PR, thanks for your contribution.

@Nino-K Nino-K closed this Dec 3, 2015
dayvar14 pushed a commit to dayvar14/tail that referenced this pull request Feb 21, 2024
* Add timeouts to tests

* apparently 30s was too ambitious
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants