Closed jeqo closed 7 months ago
Do I understand correctly that the problem is that the index may be longer than nextElement()
? Or something else?
Yes, that was my understanding; however I may have rushed a bit here and actually it's working correctly (though not obvious):
I got confused by the mixture of a outdated past memories. I will create a quick PR to document these less obvious conditions so the future me doesn't get confused again 😅
Added doc comments as part of https://github.com/Aiven-Open/tiered-storage-for-apache-kafka/pull/535
As it is currently validated, there is a chance indexes are not fully consumed when transforming, as the validation is assuming the whole stream is consumed, when it is not.
By introducing an output stream to hold the processed content, and passing the buffer to the storage layer we guarantee that the validation is correctly validating that there is only a single chunk processed.