Minor patch; missing comment update in worker.c

Started by Hayato Kuroda (Fujitsu)over 1 year ago3 messageshackers
Jump to latest
#1Hayato Kuroda (Fujitsu)
kuroda.hayato@fujitsu.com

Dear hackers,
(Adding Amit in CC because he was an original committer)

While reading codes in master, I found the below comment in worker.c.:
```
* We don't allow to toggle two_phase option of a subscription because it can
* lead to an inconsistent replica. Consider, initially, it was on and we have
* received some prepare then we turn it off, now at commit time the server
* will send the entire transaction data along with the commit. With some more
* analysis, we can allow changing this option from off to on but not sure if
* that alone would be useful.
```

But this is not correct anymore, 1462aad2 allows to alter two_phase option.
I was an original author, but I did oversight.

I feel it can be fixed by referring the commit message, attached patch fixed like
that. How do you feel?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachments:

0001-Fix-missing-comment-update-in-1462aad2.patchapplication/octet-stream; name=0001-Fix-missing-comment-update-in-1462aad2.patchDownload+5-7
#2Amit Kapila
amit.kapila16@gmail.com
In reply to: Hayato Kuroda (Fujitsu) (#1)
Re: Minor patch; missing comment update in worker.c

On Mon, Jun 23, 2025 at 8:22 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:

But this is not correct anymore, 1462aad2 allows to alter two_phase option.
I was an original author, but I did oversight.

I feel it can be fixed by referring the commit message, attached patch fixed like
that. How do you feel?

Thanks for the report and patch. I'll look into it.

--
With Regards,
Amit Kapila.

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#2)
Re: Minor patch; missing comment update in worker.c

On Mon, Jun 23, 2025 at 8:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jun 23, 2025 at 8:22 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:

But this is not correct anymore, 1462aad2 allows to alter two_phase option.
I was an original author, but I did oversight.

I feel it can be fixed by referring the commit message, attached patch fixed like
that. How do you feel?

Thanks for the report and patch. I'll look into it.

We can now completely remove that comment, as the necessary details
are already present in subscriptioncmds.c. I have done that and pushed
the patch. Thanks.

--
With Regards,
Amit Kapila.