From e5b66122af572557c3b404bc8d45b74d2c53fe81 Mon Sep 17 00:00:00 2001 From: gindibay Date: Tue, 31 Oct 2023 16:11:12 +0300 Subject: [PATCH] Fixes review notes --- src/backend/distributed/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/backend/distributed/README.md b/src/backend/distributed/README.md index a9e769323..225b1f962 100644 --- a/src/backend/distributed/README.md +++ b/src/backend/distributed/README.md @@ -1772,11 +1772,17 @@ Each field in the struct is documented in the comments within the `DistributeObj - **Returning tasks for `preprocess` and `postprocess`**: Ensure that either `preprocess` or `postprocess` returns a list of "DDLJob"s. If both functions return non-empty lists, then you would get an assertion failure. -- **Generic `preprocess` and `postprocess` methods**: ``PreprocessAlterDistributedObjectStmt`` and ``PostprocessAlterDistributedObjectStmt`` are generic post and pre methods that are used for some statements. Both of them are being used for distributed object operations. +- **Generic `preprocess` and `postprocess` methods**: The generic methods, `PreprocessAlterDistributedObjectStmt` and `PostprocessAlterDistributedObjectStmt`, serve as generic pre and post methods utilized for various statements. Both of these methods find application in distributed object operations. - - PreprocessAlterDistributedObjectStmt perform below operations perform qualify operation, deparse the statement and generate a task list. PostprocessAlterDistributedObjectStmt - calls ``EnsureAllObjectDependenciesExistOnAllNodes`` to propagate missing dependencies both on coordinator and worker. + - The `PreprocessAlterDistributedObjectStmt` method carries out the following operations: + - Performs a qualification operation. + - Deparses the statement and generates a task list. + + - As for the `PostprocessAlterDistributedObjectStmt` method, it: + - Invokes the `EnsureAllObjectDependenciesExistOnAllNodes` function to propagate missing dependencies, both on the coordinator and the worker. + + - Before defining new `preprocess` or `postprocess` methods, it is advisable to assess whether the generic methods can be employed in your specific case. - - Before defining a new `preprocess` or `postprocess` method, check if the generic methods can be used in your case. - **`deparse`**: When propagating the command to worker nodes, make sure to define `deparse`. This is necessary because it generates a query string for each worker node.