Details
Removed the farcaster channel tag and confirmed that the farcaster channel id and the blob holder were removed in the correct row of the communites table + also confirmed that the blob holding the farcaster channel <> comm community association was deleted
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
keyserver/src/deleters/farcaster-channel-tag-deleters.js | ||
---|---|---|
29–34 | Initially tried to use RETURNING blob_holder AS blobHolder as part of the query (just like in deleteInviteLink); however, was getting a You have an error in your SQL syntax; error so created a separate query to get the blob holder and now everything works as expected | |
lib/types/community-types.js | ||
31 | Initially we were passing the blobHolder as part of the request since the blob holder was temporarily stored in redux; however, now that we can store the blobHolder in the communities table on the keyserver, the blob holder should never be in the client so we should remove it as part of the request |
keyserver/src/deleters/farcaster-channel-tag-deleters.js | ||
---|---|---|
29–34 | It seems like MariaDB doesn't support RETURNING with UPDATE statements https://mariadb.com/kb/en/update/. I can see some problems with the current implementation:
There are at least 3 possible solutions:
The chance for this edge case is really low, so we should decide if we really care about it. |
keyserver/src/deleters/farcaster-channel-tag-deleters.js | ||
---|---|---|
29–34 | Updated the query to use the transaction approach |
Tested everything end-2-end and everything still works as previously. However, would appreciate a second pair of eyes on the query as a sanity check + since I made some significant changes to query logic.
keyserver/src/deleters/farcaster-channel-tag-deleters.js | ||
---|---|---|
50–56 ↗ | (On Diff #40546) | We have another problem here: what happens if deleting the blob fails? It might be possible that the keyserver DB will no longer have the holder, but the blob will still exist in the blob service. Should we clear it later, or something? |
keyserver/src/deleters/farcaster-channel-tag-deleters.js | ||
---|---|---|
50–56 ↗ | (On Diff #40546) | Going to land as is, but will create a task to track this concern. At least for now if we run into this edge case we should be able to manually edit/delete database rows in AWS console cc @bartek https://linear.app/comm/issue/ENG-8379/improve-handling-failed-delete-farcaster-channel-tag-blob |