Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Trying to hot-fix s3 bug. Hangs in reads from ContentAsInputStream #504

Closed
wants to merge 1 commit into from

Conversation

ChGen
Copy link

@ChGen ChGen commented Dec 1, 2023

Trying to hot-fix s3 bug. Hangs in reads from ContentAsInputStream.inputStream().
Instances of PublisherAs(content) can read data from content correctly, so two new methods were introduced, which use byte[] instead of InputStream.

@ChGen ChGen requested a review from dgarus December 1, 2023 12:00
@ChGen
Copy link
Author

ChGen commented Dec 1, 2023

@dgarus , please review/comment. This is more like a hot-fix, but it passes all tests locally for asto, conda-adapter & artipie.

@olenagerasimova
Copy link
Member

olenagerasimova commented Dec 1, 2023

@ChGen I've checked com.artipie.conda.meta.MergedJson.Jackson class and method merge() and noticed, that JsonParser is not closed anywhere in this method. Have you tried to call close()?

As for this approach... The whole idea of this class is NOT TO READ PUBLISHER INTO BYTE ARRAY, so I do not agree with adding these methods into asto. Fix for conda can be done inside conda via PublisherAs(content).getBytes(), no need to add these strange methods into asto

@ChGen
Copy link
Author

ChGen commented Dec 1, 2023

@olenagerasimova , thanks, I'll try your suggestions. I understand that reading all to byte array isn't good anyway, but I'd rather to publish working hotfix in predictable manner, and than debug this properly as a next step.

@ChGen
Copy link
Author

ChGen commented Dec 1, 2023

Actually, metadata is small, compared to the artifacts, so we are quite safe with that.

@ChGen ChGen closed this Dec 6, 2023
@ChGen
Copy link
Author

ChGen commented Dec 6, 2023

Hotfix provided in artipie/artipie#1351

@ChGen ChGen deleted the s3-bug branch December 21, 2023 07:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants