Transaction Library Recommendations

90 views
Skip to first unread message

DT Mirizzi

unread,
Jul 20, 2021, 5:17:49 PM7/20/21
to golang-nuts
Hey, 

I wrote this library a few years ago and in an effort to improve, was wondering if anyone had any suggestions to this codebase? 

I attempted to use the common library as my style guide. 

I havn't found anything like it in, so I assumed most just wrote their own implementation of a transaction abstraction. 

Code:

Thanks, 
DT 

Tamás Gulácsi

unread,
Jul 21, 2021, 3:28:38 AM7/21/21
to golang-nuts
Hi,

1. Where are the transactions? I see only "up" and "down", and each can fail - even the "down" after a failed "up".
2. You spawn goroutines, and collect errors using append - that's racy. Run the tests with "-race" and see for yourself!

Tamás
Reply all
Reply to author
Forward
0 new messages