-
Notifications
You must be signed in to change notification settings - Fork 641
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
Use a fixed length segment descriptor #13240
Comments
@npepinpe We discussed different things previously.
I'm now thinking about which way to proceed. Any opinions? |
The second one as well 👍 |
Closing this issue as we decided not to use fixed length descriptor. Instead PR #13618 improves the handling of version in segment descriptor. |
13618: Remove unnecessary new version from segment descriptor r=deepthidevaki a=deepthidevaki ## Description Remove keeping track of descriptor length for each version. Instead the length is determined while decoding sbe. As a consequence, we cannot check and fail early before the descriptor is read if the file size is not enough to store the descriptor. Since we rely on sbe to determine length, we can also remove version 3 which was introduced recently when new fields were added to the descriptor. In addition, this PR also refactors SegmentDescriptor and split the reading from buffer and decoding out of it. Note:- This is backward **incompatible** with the previous SNAPSHOT and 8.3.0-alpha3, because we removed version 3. But it is still backward compatible with previous minor (8.2.x). ## Related issues related #13240 But we decided not use fixed length 13706: Optimize Dockerfile for CVE maintenance r=npepinpe a=npepinpe ## Description Refactors our container image to reduce the effort related to CVE maintenance by: - Build the final target on top of the latest available LTS Ubuntu - This lets us track Ubuntu updates much faster than via the Temurin image - Upgrade all install required packages to the latest on build - Build a custom JRE out of the official Temurin JDK - This lets us keep up to date with Temurin updates - As a bonus, we get to have a smaller JRE (via module compression), and keep useful production utilities: `jcmd`, `jmap`, `jps` - The new image has a lower vulnerability count: - 12 issues across 203 dependencies: 3 med, 9 low - versus 20 issues across 237 dependencies: 4 med, 16 low - The new image is smaller: - 357 MB over 8 layers: base (78), packages (3.8), JDK (101), and Zeebe (174) - 444 MB over 9 layers: base (73), packages (57), JDK (141), and Zeebe (174) The main difference between using our own Java image versus the Temurin base is the smaller JRE (due to module compression), and two packages I haven't installed: locales, and tzdata. These contain language packs and time zone info, two features we don't really use in Zeebe. > **Note** > This could affect third party code such as exporters and interceptors, so we may want to reintroduce this to provide an as-close-as-possible experience to stock JDK for users. However, I don't know if we have any real data to validate this. We don't do i18n (and I don't expect exporters or interceptors to as well), and it's better to deal with UTC in your producing system and only change it in your clients anyway. > **Note** > The custom JRE idea comes from the Identity team, so kudos for that 🎉 ## Related issues closes #13214 closes #12959 Co-authored-by: Deepthi Devaki Akkoorath <[email protected]> Co-authored-by: Nicolas Pepin-Perreault <[email protected]>
Follow up ##12839 (comment)
In PR #12839, when we added new fields to the segment descriptor the descriptor length changed. This can cause issues, when we overwrite an existing descriptor. We have to ensure that we don't accidently overwrite the first entry. This is handled in the PR. But, when ever we make changes to the descriptor this needs to be handled correctly. It is prone to errors, so it is better we use fixed size for the descriptor. We may not use the full allocated bytes, but it allows us to add new fields without the need to change the length again.
Besides, we also now have to keep track of length of each version. #12839 (comment) With fixed lenght, we might be able to handle this better.
Note: Better do it before 8.3, otherwise it will be more effort to make it backward compatible.
The text was updated successfully, but these errors were encountered: