[Core][Bug] Fix bug when read changelog's IndexManifest. #5058
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
We encountered an exception in our production job.
![image](https://private-user-images.githubusercontent.com/22708867/411887448-8c2fd361-6db7-4bd3-bff8-7df3dd6af0a8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTEzNTEsIm5iZiI6MTczOTU1MTA1MSwicGF0aCI6Ii8yMjcwODg2Ny80MTE4ODc0NDgtOGMyZmQzNjEtNmRiNy00YmQzLWJmZjgtN2RmM2RkNmFmMGE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE2MzczMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc3NGExMzAxZWU5NzIwNzM1ZWM3NzFiZGQ1ZWE2NTc4YTA5YzRmMzc2MzM1N2JhMjEzYzkyMGQzMTU5YTk5NGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1DC-thA0ahF5Ayc8QcYWA3sB9ukG6abbr9VgE4TH1lc)
After investigate this issue, the reason of this exception is :
We open
Changelog
decouple, theChangelog
has records theindexManifest
. But theSnapshot
of theChangelog
has been expired. So when read thisChangelog
will read the non-existedindexManifest
.We have think two functions to solve this problem.
1、 Don't read the
indexManifest
when streaming read theChangelog
.2、Override the
indexManifest
method inChangelog
, which return null forever.Due to the design of
Changelog
andTag
is extendsSnapshot
, they should not modify the field ofSnapshot
. So after discuss we choose the function 1.Linked issue: close #xxx
Tests
API and Format
Documentation