ipfs / go-datastore

key-value datastore interfaces
MIT License
228 stars 64 forks source link

feat: return error from txn.Discard() #193

Closed guseggert closed 1 year ago

guseggert commented 2 years ago

To properly discard a transaction usually requires some external call to the backing DB, which can fail. Currently implementations just swallow any errors when discarding transactions, but this should be surfaced to the application so that it can decide the appropriate action (at the very least, log the error).

This is of course a breaking change and both datastore impls and consumers will need to be updated.

BigLep commented 1 year ago

@guseggert : I put this on the 0.21 iteration. Adjust if something different should be done.

guseggert commented 1 year ago

Agreed this is a small change but has a big blast radius, which is why I didn't really prioritize it before. I'm going to downgrade this to draft until we estimate costs and then figure out if we really want this.

guseggert commented 1 year ago

unlikely to do anything about this anytime soon, so closing