This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 74c48c597d9c5061726707dd444b813f9c97ae4d
Author: Soumyadeep Chakraborty <[email protected]>
AuthorDate: Sun Oct 30 15:00:33 2022 -0700

    ao/co: Remove FIXME for DML state mechanism
    
    The backend local hash table mechanism works well enough for storing
    DML/DML-like command-bound state. Lift the FIXME that questions its
    applicability.
    
    Discussion: 
https://groups.google.com/a/greenplum.org/g/gpdb-dev/c/g_RG4r_9W3s/m/VJNafJibEQAJ
---
 src/backend/access/aocs/aocsam_handler.c             | 16 ++++++----------
 src/backend/access/appendonly/appendonlyam_handler.c | 15 +++++----------
 2 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/backend/access/aocs/aocsam_handler.c 
b/src/backend/access/aocs/aocsam_handler.c
index 0fc06c4ad9..7dbdb37756 100644
--- a/src/backend/access/aocs/aocsam_handler.c
+++ b/src/backend/access/aocs/aocsam_handler.c
@@ -88,6 +88,9 @@ typedef struct AOCSBitmapScanData
        int     rs_cindex;      /* current tuple's index tbmres->offset or -1 */
 } *AOCSBitmapScan;
 
+/*
+ * Per-relation backend-local DML state for DML or DML-like operations.
+ */
 typedef struct AOCODMLState
 {
        Oid                             relationOid;
@@ -107,17 +110,10 @@ typedef struct AOCODMLState
 } AOCODMLState;
 
 static void reset_state_cb(void *arg);
+
 /*
- * GPDB_12_MERGE_FIXME: This is a temporary state of things. A locally stored
- * state is needed currently because there is no viable place to store this
- * information outside of the table access method. Ideally the caller should be
- * responsible for initializing a state and passing it over using the table
- * access method api.
- *
- * Until this is in place, the local state is not to be accessed directly but
- * only via the *_dml_state functions.
- * It contains:
- *             a quick look up member for the common case
+ * A repository for per-relation backend-local DML states. Contains:
+ *             a quick look up member for the common case (only 1 relation)
  *             a hash table which keeps per relation information
  *             a memory context that should be long lived enough and is
  *                     responsible for reseting the state via its reset cb
diff --git a/src/backend/access/appendonly/appendonlyam_handler.c 
b/src/backend/access/appendonly/appendonlyam_handler.c
index 2151ade951..6f4941447c 100644
--- a/src/backend/access/appendonly/appendonlyam_handler.c
+++ b/src/backend/access/appendonly/appendonlyam_handler.c
@@ -57,6 +57,9 @@ static void reset_state_cb(void *arg);
 
 static const TableAmRoutine ao_row_methods;
 
+/*
+ * Per-relation backend-local DML state for DML or DML-like operations.
+ */
 typedef struct AppendOnlyDMLState
 {
        Oid relationOid;
@@ -78,16 +81,8 @@ typedef struct AppendOnlyDMLState
 
 
 /*
- * GPDB_12_MERGE_FIXME: This is a temporary state of things. A locally stored
- * state is needed currently because there is no viable place to store this
- * information outside of the table access method. Ideally the caller should be
- * responsible for initializing a state and passing it over using the table
- * access method api.
- *
- * Until this is in place, the local state is not to be accessed directly but
- * only via the *_dml_state functions.
- * It contains:
- *             a quick look up member for the common case
+ * A repository for per-relation backend-local DML states. Contains:
+ *             a quick look up member for the common case (only 1 relation)
  *             a hash table which keeps per relation information
  *             a memory context that should be long lived enough and is
  *                     responsible for reseting the state via its reset cb


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to