Depends on D3635
The logic for writeResponse handling writing compaction chunks
Differential D3636
[services] Backup - pull backup reactor - logs - write response • karol on Apr 6 2022, 7:39 AM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Is it possible for someone to append a log while we're reading it? What is the plan for handling such scenario?
Comment Actions I agree switch doesn't seem great here given we are entering two of the blocks. Yes this is possible with switch, but personally I believe it should be avoided and considered an anti-pattern. I think @palys-swm's framing is good: if you can ever avoid writing a comment by changing the code around, then you should change the code around. Comment Actions I still lean towards switch but since I'm outvoted, I'm just going to push the change with if. Comment Actions The indentation is really deep in this code. Could you spend some time verifying if there are ways to reduce it?
Comment Actions @karol-bisztyga you should NEVER, EVER land a diff without responding to every single comment on the diff. We talked about this in the retro yesterday... it continues to be a serious issue. Honest question: what do you think of the idea of having @palys-swm only accept your diffs if he has zero comments?
Comment Actions Ahh, I see what's wrong, I wrote a comment but forgot to hit Submit :( Sorry
Comment Actions I think ideally, the process of downloading logs is "checkpointed", which effectively means option 3 – basically, we download N logs at a time, starting with the oldest. After each download, the client passes back the timestamp on the newest log downloaded so far as a checkpoint, saying "what are the next logs to download after this one?" That way, if a new log is created, it should still be downloaded at the end. Comment Actions Ok, now I realize we might've talked about that, thanks for clarifying. Option no. 3 is in fact the best, I agree. I think this is too big of a topic to just create a diff right away with a fix. I think we should create a task for this with an explicit summary and a test plan. It may not be so easy to test it. Do you agree we should create a task for this or should we just proceed with a diff? Comment Actions It looks like the updated implementation will require a couple of diffs. At the same time, this code works ok. So it seems that handling this as a separate task is a good idea. |