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

error="unknown attributes on uncompressed message 8" #90

Closed
kevinconaway opened this issue Sep 28, 2021 · 17 comments
Closed

error="unknown attributes on uncompressed message 8" #90

kevinconaway opened this issue Sep 28, 2021 · 17 comments

Comments

@kevinconaway
Copy link

We are piloting this project out and are running in to this error when trying to consume from one of our brokers:

unknown attributes on uncompressed message 8

The error is being returned from fetches.Errors()

This particular broker cluster has the following settings:

version=2.2.1
inter.broker.protocol.version: "2.2"
log.message.format.version: "0.10.1"

We do not see the same issue on another broker cluster with the following settings:

version: 2.7.1
inter.broker.protocol.version: 2.7.1
log.message.format.version: "2.7"

I've tried passing different versions to the client via kgo.MaxVersions to no avail

Is there some other option that I should be setting here or is there any way to get more debug information about what is happening here?

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

I think this is a tiny bug in this client. The broker is returning LogAppendTime (bit 3) for a message, and the client is not expecting that. This is almost certainly an error introduced in a previous large refactoring, and was uncaught because the integration tests are on new Kafkas (message sets were removed in Kafka 0.11).

I can patch this quickly and tag a patch release.

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

If possible, can you try this commit? 5fee169

If not, I can tag that directly, but if you can check that it fixes things before the patch release, that'd be great!

@kevinconaway
Copy link
Author

Thanks.

I was reading through the spec and noticed that LogAppendTime in bit 3 would cause the value to be 8. However both of the clusters have LogAppendTime set as message.timestamp.type

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

Is the new cluster using records, vs. the old message set format?

@kevinconaway
Copy link
Author

If possible, can you try this commit? 5fee169

It looks like there is a compiler error here

Is the new cluster using records, vs. the old message set format?

I'm sorry, I don't understand the question

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

It looks like there is a compiler error here

That teaches me for thinking this was easy enough to not need to stash my other work, very sorry about that. I'll run the integration tests for the next commit just to be sure...

I'm sorry, I don't understand the question

The other cluster settings you posted show log.message.format.version: "2.7", which uses the "new" RecordBatch format, rather than the old MessageSet. The client isn't as sensitive on attributes for the newer format. Point is, if the new format has LogAppendTime, that'll be fine because the client doesn't choke as hard there.

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

6e639fb compiles & passes (as well as the followup unrelated commit), if you could check.

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

I'll check back in an hour, if I don't hear back I'll go ahead and tag :)

@kevinconaway
Copy link
Author

Just deployed this out to both clusters. It is unfortunately still failing with the same error on the 2.2.1 cluster.

@kevinconaway
Copy link
Author

This fails in this little example as well

My bit twiddling skills leave a lot to be desired but can't the 3rd bit for LogAppendTime be 0 or 1? If so, I think this code is only checking if its 0

@twmb
Copy link
Owner

twmb commented Sep 28, 2021 via email

@kevinconaway
Copy link
Author

A value of 8 means bit 4 is set, which I know nothing about.

Per the spec:

This byte holds metadata attributes about the message.

The lowest 3 bits contain the compression codec used for the message.

The fourth lowest bit represents the timestamp type. 0 stands for CreateTime and 1 stands for LogAppendTime. The producer should always set this bit to 0. (since 0.10.0)

All other bits should be set to 0.

If thats the case, it seems like it is only the fourth bit set so 0000 1000 -> 2^3 -> 8

@twmb
Copy link
Owner

twmb commented Sep 28, 2021 via email

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

I very much hope this commit works: 688d6fb
Given the prior success rate, I'm expecting the worse, but please let me know.

@kevinconaway
Copy link
Author

🤞

Will take me ~30m to get it out

@kevinconaway
Copy link
Author

Looks good!

@twmb
Copy link
Owner

twmb commented Sep 28, 2021

Awesome, thank you! I've gone ahead and tagged this in v1.1.2. I'm going to close this for now but if anything else crops up please let me know!

@twmb twmb closed this as completed Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants