-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couple of questions #19
Comments
Basically, thinking about it more, I need to be in a situation where I'm writing to the WAL, it's persisting, and if anything happens, like a crash, I can restart the current process, it reads from the WAL and it knows that it can drain the WAL and write all those messages to the database and then carry on, as if there was no WAL and that all the messages to the db had been written in sync |
According to your description, the WAL is suitable for you, because it is sequential IO, which will improve your system thought. Thanks for your attention, give us feedback if you have any problems using WAL, enjoy! |
Welcome to add your case at #13, which will encourage us a lot, thanks! |
Hi, I'm thinking of using this to increase the rate of instrument transactions that we can process, by using a local WAL I can increase the throughput as I can process the requests to the database in a worker.
So reading this:
I'm a little bit confused - if there's a fatal crash in the process, how will writes not be lost? If they're stored in a buffer in memory, before fsync, then how are those writes recoverred?
Second question, if I'm simultaneously writing and reading to (and then deleting from) the WAL from different threads:
I use:
to write, and:
to read. Does
reader := w.WAL.NewReader()
return all the segments up and until the point in time that the function is called? I think it does looking at:and then:
seems to be 0 chunks in the new reader that was created and therefore it doesn't process any messages in there?
What's also the safest way to delete so that I never reprocess a message twice (although it isn't the end of the world if I do (if it's chronological), it's just costs time).
I can work it out with sufficient testing, but I figured it may be worth asking here.
Thank you in advance 🧡
The text was updated successfully, but these errors were encountered: