Introduce ForceRerun parameter for Linux RCv2#65
Conversation
viveklingaiah
commented
Aug 29, 2025
- If ForceRerun = true, Linux RCv2 will be force run even if new sequence number has already been noted down to be run previously.
| func checkAndSaveSeqNum(ctx log.Logger, seq int, mrseqPath string, forceRerun bool) (shouldExit bool, _ error) { | ||
| ctx.Log("event", "comparing seqnum", "path", mrseqPath) | ||
| smaller, err := seqnum.IsSmallerThan(mrseqPath, seq) | ||
| isSavedSeqNumSmallerThanNewSeqNum, err := seqnum.IsSmallerThan(mrseqPath, seq) |
There was a problem hiding this comment.
We should trace somewhere (and also put it in an extension event) that the force flag was used.
| } | ||
|
|
||
| if !smaller { | ||
| if !forceRerun && !isSavedSeqNumSmallerThanNewSeqNum { |
There was a problem hiding this comment.
What happens if the machine is rebooted? From this it appears we'll run the script every time RCV2 is executed. Why not just have CRP increment the seqNo?
There was a problem hiding this comment.
Good idea. I did think about it earlier. Do you mean instead of making this "ForceRun" (thinking to rename it) flag change in Windows and Linux extensions, we could just increment sequence number in CRP ? Only thing is it may not work right away if for some reason the VM has much higher sequence number than what CRP has. Especially, Linux uses files to note down mrseq number and if user reuses a disk for example. That may be an edge case though.
There was a problem hiding this comment.
I think just incrementing it in CRP is a better solution. I'll close this PR