Fix typos in reorderbuffer.c

Started by Amit Kapilaover 5 years ago3 messages
#1Amit Kapila
amit.kapila16@gmail.com
1 attachment(s)

@@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
ReorderBufferCleanupTXN(rb, subtxn);
}

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, &txn->changes)
  {
  ReorderBufferChange *change;
@@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
  ReorderBufferTruncateTXN(rb, subtxn);
  }
- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, &txn->changes)
  {
  ReorderBufferChange *change;

Both the above functions are recursive and will clean the changes for
both the top-level transaction and subtransactions. So, I feel the
comments should be accordingly updated.

--
With Regards,
Amit Kapila.

Attachments:

v1-0001-Fix-typos-in-reorderbuffer.c.patchapplication/octet-stream; name=v1-0001-Fix-typos-in-reorderbuffer.c.patchDownload
From 96bfe0c1752f8dd877e1c3bdcb4f3836b4aefdf0 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 8 Oct 2020 13:56:35 +0530
Subject: [PATCH v1] Fix typos in reorderbuffer.c.

---
 src/backend/replication/logical/reorderbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 189641bbf5..4cb27f2224 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
 		ReorderBufferCleanupTXN(rb, subtxn);
 	}
 
-	/* cleanup changes in the toplevel txn */
+	/* cleanup changes in the txn */
 	dlist_foreach_modify(iter, &txn->changes)
 	{
 		ReorderBufferChange *change;
@@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
 		ReorderBufferTruncateTXN(rb, subtxn);
 	}
 
-	/* cleanup changes in the toplevel txn */
+	/* cleanup changes in the txn */
 	dlist_foreach_modify(iter, &txn->changes)
 	{
 		ReorderBufferChange *change;
-- 
2.28.0.windows.1

#2Masahiko Sawada
masahiko.sawada@2ndquadrant.com
In reply to: Amit Kapila (#1)
Re: Fix typos in reorderbuffer.c

On Thu, 8 Oct 2020 at 17:37, Amit Kapila <amit.kapila16@gmail.com> wrote:

@@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
ReorderBufferCleanupTXN(rb, subtxn);
}

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
dlist_foreach_modify(iter, &txn->changes)
{
ReorderBufferChange *change;
@@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
ReorderBufferTruncateTXN(rb, subtxn);
}
- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
dlist_foreach_modify(iter, &txn->changes)
{
ReorderBufferChange *change;

Both the above functions are recursive and will clean the changes for
both the top-level transaction and subtransactions.

Right.

So, I feel the
comments should be accordingly updated.

+1 for this change.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#2)
Re: Fix typos in reorderbuffer.c

On Thu, Oct 8, 2020 at 2:40 PM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

On Thu, 8 Oct 2020 at 17:37, Amit Kapila <amit.kapila16@gmail.com> wrote:

So, I feel the
comments should be accordingly updated.

+1 for this change.

Thanks, I have pushed this and along with it pushed a typo-fix in logical.c.

--
With Regards,
Amit Kapila.