[PI-5013] do not cache write client to force timeline server restart before write #22
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.
See apache#12652 for more details on the issue this addresses. Restarting the timeline server before the write seems completely safe to me because it's a no-op if timeline server should be disabled or if it's already running. I'm not sure why it's stopped after each write in the first place but hopefully this will be clarified in the issue I linked. Restarting it should still work well enough for our use case and avoid recreating
fgIdToReplaceInstants
for every partition. This mapping is only created when the FS view is initialized which, in case ofREMOTE_ONLY
view, only happens when the timeline server is started (once per batch on the driver, the timeline server is really just a proxy for an in-memory FS view). I tested this change in the lab and it successfully wrote a couple of batches, previously it was consistently failing on the second one.