fix: ability to upload the same file after deleting#197
Conversation
nugaon
left a comment
There was a problem hiding this comment.
This whole fix seems wrong for me.
If there is a chunk conflict on feed upload, check whether the identifiers of SOC match or not, if so, the problem is there -> you shouldn't write to the same index.
f73bc81 to
fd584fa
Compare
nugaon
left a comment
There was a problem hiding this comment.
so if I understand, the problem was the writeFeedDataRaw attempted to write on a reserved index since the next subsequent index was not calculated.
it is quite strange since it should have thrown an error because of writing on a reserved index.
maybe instead of
if (!epoch) {
epoch = new Epoch(HIGHEST_LEVEL, getUnixTimestamp())
}
this snippet should find for the latest free index instead if epoch is not defined
| let nextEpoch | ||
| try { | ||
| const feedData = await getFeedData(connection.bee, fullPath, prepareEthAddress(podWallet.address)) | ||
| feedData.epoch.level = feedData.epoch.getNextLevel(feedData.epoch.time) | ||
| nextEpoch = feedData.epoch | ||
| // eslint-disable-next-line no-empty | ||
| } catch (e) {} |
There was a problem hiding this comment.
maybe this snippet could be moved to writeFeedData to ensure the feed write will happen on the next free index, wdyt?
|
|
||
| return socWriter.upload(connection.postageBatchId, id, data) | ||
| return await socWriter.upload(connection.postageBatchId, id, data, { | ||
| pin: true, |
There was a problem hiding this comment.
why do you need pinning? we do not require this
fd584fa to
ad5d959
Compare
|
This PR has been open for over 3 years (since December 2022) and has CHANGES_REQUESTED status. Is this still active? Please update with requested changes or close if abandoned. |
|
This PR has been open for over 3 years (since December 2022) with CHANGES_REQUESTED status. The fix for file upload after deletion may now be outdated or already addressed elsewhere. Action required:
|
Stale PR check — 2026-04-27 (CTO daily cadence)This PR has been open since 2022-12-15 (over 3 years) with CHANGES_REQUESTED status. Is this still active? Please update or close if abandoned. — CTO review cadence, automated check |
Close #192