Re: Add macros for ReorderBufferTXN toptxn

2023-03-19 Thread Peter Smith
On Sat, Mar 18, 2023 at 8:47 AM Peter Smith wrote: > > The build-farm was OK for the last 18hrs after this push, except there > was one error on mamba [1] in test-decoding-check. > > This patch did change the test_decoding.c file, so it seems an > unlikely coincidence, but OTOH the change was very

Re: Add macros for ReorderBufferTXN toptxn

2023-03-17 Thread Peter Smith
The build-farm was OK for the last 18hrs after this push, except there was one error on mamba [1] in test-decoding-check. This patch did change the test_decoding.c file, so it seems an unlikely coincidence, but OTOH the change was very small and I don't see yet how it could have caused a problem h

Re: Add macros for ReorderBufferTXN toptxn

2023-03-16 Thread Amit Kapila
On Thu, Mar 16, 2023 at 7:20 AM Peter Smith wrote: > > PSA v4 which addresses both of your review comments. > Pushed. -- With Regards, Amit Kapila.

Re: Add macros for ReorderBufferTXN toptxn

2023-03-15 Thread Amit Kapila
On Thu, Mar 16, 2023 at 10:40 AM Bharath Rupireddy wrote: > > On Thu, Mar 16, 2023 at 7:20 AM Peter Smith wrote: > > > > PSA v4 which addresses both of your review comments. > > Looks like a reasonable change to me. > > A nitpick: how about using rbtxn_get_toptxn instead of an explicit > variable

Re: Add macros for ReorderBufferTXN toptxn

2023-03-15 Thread Bharath Rupireddy
On Thu, Mar 16, 2023 at 7:20 AM Peter Smith wrote: > > PSA v4 which addresses both of your review comments. Looks like a reasonable change to me. A nitpick: how about using rbtxn_get_toptxn instead of an explicit variable toptxn for single use? 1. Change ReorderBufferTXN *toptxn = rbtxn_get

Re: Add macros for ReorderBufferTXN toptxn

2023-03-15 Thread Peter Smith
On Wed, Mar 15, 2023 at 4:55 PM Masahiko Sawada wrote: > > Hi, > ... > +1 to the idea. Here are some minor comments: > > @@ -1667,7 +1658,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb, > ReorderBufferTXN *txn, bool txn_prep > * about the toplevel xact (we send the XID in all messages), but we

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Masahiko Sawada
Hi, On Wed, Mar 15, 2023 at 8:55 AM Peter Smith wrote: > > On Tue, Mar 14, 2023 at 10:43 PM Amit Kapila wrote: > > > > On Tue, Mar 14, 2023 at 12:37 PM Peter Smith wrote: > > > > > > Thanks for the review! > > > > > > On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: > > > ... > > > > > > > 4)

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Peter Smith
On Tue, Mar 14, 2023 at 10:33 PM vignesh C wrote: > > On Tue, 14 Mar 2023 at 12:37, Peter Smith wrote: > > > > Thanks for the review! > > > > On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: > > ... > > > Few comments: > > > 1) Can we move the macros along with the other macros present in this >

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Peter Smith
On Tue, Mar 14, 2023 at 10:43 PM Amit Kapila wrote: > > On Tue, Mar 14, 2023 at 12:37 PM Peter Smith wrote: > > > > Thanks for the review! > > > > On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: > > ... > > > > > 4) We check if txn->toptxn is not null twice here both in if condition > > > and i

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Amit Kapila
On Tue, Mar 14, 2023 at 5:03 PM vignesh C wrote: > > On Tue, 14 Mar 2023 at 12:37, Peter Smith wrote: > > > > The same issue exists here too: > 1) > - if (toptxn != NULL && !rbtxn_has_catalog_changes(toptxn)) > + if (rbtxn_is_subtxn(txn)) > { > - toptxn->txn_flag

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Amit Kapila
On Tue, Mar 14, 2023 at 12:37 PM Peter Smith wrote: > > Thanks for the review! > > On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: > ... > > > 4) We check if txn->toptxn is not null twice here both in if condition > > and in the assignment, we could retain the assignment operation as > > earlier

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread vignesh C
On Tue, 14 Mar 2023 at 12:37, Peter Smith wrote: > > Thanks for the review! > > On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: > ... > > Few comments: > > 1) Can we move the macros along with the other macros present in this > > file, just above this structure, similar to the macros added for >

Re: Add macros for ReorderBufferTXN toptxn

2023-03-14 Thread Peter Smith
Thanks for the review! On Mon, Mar 13, 2023 at 6:19 PM vignesh C wrote: ... > Few comments: > 1) Can we move the macros along with the other macros present in this > file, just above this structure, similar to the macros added for > txn_flags: > /* Toplevel transaction for this subxact (N

Re: Add macros for ReorderBufferTXN toptxn

2023-03-13 Thread vignesh C
On Fri, 10 Mar 2023 at 04:36, Peter Smith wrote: > > Hi, > > During a recent code review, I was confused multiple times by the > toptxn member of ReorderBufferTXN, which is defined only for > sub-transactions. > > e.g. txn->toptxn member == NULL means the txn is a top level txn. > e.g. txn->toptxn

Re: Add macros for ReorderBufferTXN toptxn

2023-03-10 Thread Amit Kapila
On Fri, Mar 10, 2023 at 4:36 AM Peter Smith wrote: > > During a recent code review, I was confused multiple times by the > toptxn member of ReorderBufferTXN, which is defined only for > sub-transactions. > > e.g. txn->toptxn member == NULL means the txn is a top level txn. > e.g. txn->toptxn membe

Add macros for ReorderBufferTXN toptxn

2023-03-09 Thread Peter Smith
Hi, During a recent code review, I was confused multiple times by the toptxn member of ReorderBufferTXN, which is defined only for sub-transactions. e.g. txn->toptxn member == NULL means the txn is a top level txn. e.g. txn->toptxn member != NULL means the txn is not a top level txn It makes sen