getsentry/sentry-cli

Deduplicate debug file chunk uploads

szokeasaurusrex opened this issue · 0 comments

In the case where the same chunk appears more than once in a debug file chunk upload, we only need to upload the chunk once. However, we currently upload duplicate chunks as many times as they appear in the file we are trying to upload. This was observed while implementing the new chunk uploading tests (#2275).

We should deduplicate chunks before upload. Likely, this can be done easily by using a HashSet (just throw all the chunks we want to upload into the HashSet before uploading to eliminate duplicates).

We should also modify our chunk uploading tests to verify that each unique chunk gets uploaded only once. This will likely require using a multiset.