You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/07/06 02:06:39 UTC

[GitHub] [iotdb] yanhongwangg opened a new pull request #3511: add audit log when execute delete and set sg for tracing

yanhongwangg opened a new pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664190057



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1445,6 +1452,7 @@ private boolean createMultiTimeSeries(CreateMultiTimeSeriesPlan multiPlan)
 
   protected boolean deleteTimeSeries(DeleteTimeSeriesPlan deleteTimeSeriesPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("delete timeseries {}", deleteTimeSeriesPlan.getPaths());

Review comment:
       deleteTimeSeriesPlan.getPaths() returns a list...

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1512,6 +1520,7 @@ private boolean alterTimeSeries(AlterTimeSeriesPlan alterTimeSeriesPlan)
 
   public boolean setStorageGroup(SetStorageGroupPlan setStorageGroupPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("set storage group to {}", setStorageGroupPlan.getPaths());
     PartialPath path = setStorageGroupPlan.getPath();

Review comment:
       getPath or getPaths?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664190057



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1445,6 +1452,7 @@ private boolean createMultiTimeSeries(CreateMultiTimeSeriesPlan multiPlan)
 
   protected boolean deleteTimeSeries(DeleteTimeSeriesPlan deleteTimeSeriesPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("delete timeseries {}", deleteTimeSeriesPlan.getPaths());

Review comment:
       deleteTimeSeriesPlan.getPaths() returns a list...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664191039



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -959,6 +961,11 @@ private void addRowRecordForShowQuery(
 
   @Override
   public void delete(DeletePlan deletePlan) throws QueryProcessException {
+    AUDIT_LOGGER.info(
+        "delete data from {} in [{},{}]",
+        deletePlan.getPaths(),
+        deletePlan.getDeleteStartTime(),
+        deletePlan.getDeleteEndTime());

Review comment:
       Same as above.
   getPaths returns a list. Can the logger print the paths in this list directly?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664190416



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1512,6 +1520,7 @@ private boolean alterTimeSeries(AlterTimeSeriesPlan alterTimeSeriesPlan)
 
   public boolean setStorageGroup(SetStorageGroupPlan setStorageGroupPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("set storage group to {}", setStorageGroupPlan.getPaths());
     PartialPath path = setStorageGroupPlan.getPath();

Review comment:
       getPath or getPaths?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] yanhongwangg commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
yanhongwangg commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664212860



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -959,6 +961,11 @@ private void addRowRecordForShowQuery(
 
   @Override
   public void delete(DeletePlan deletePlan) throws QueryProcessException {
+    AUDIT_LOGGER.info(
+        "delete data from {} in [{},{}]",
+        deletePlan.getPaths(),
+        deletePlan.getDeleteStartTime(),
+        deletePlan.getDeleteEndTime());

Review comment:
       it can print  a list as follows
   ![image](https://user-images.githubusercontent.com/67779101/124538281-efaef200-de4d-11eb-96d3-d84f52ee0eed.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] mychaow merged pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
mychaow merged pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] yanhongwangg commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
yanhongwangg commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664211096



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -959,6 +961,11 @@ private void addRowRecordForShowQuery(
 
   @Override
   public void delete(DeletePlan deletePlan) throws QueryProcessException {
+    AUDIT_LOGGER.info(
+        "delete data from {} in [{},{}]",
+        deletePlan.getPaths(),
+        deletePlan.getDeleteStartTime(),
+        deletePlan.getDeleteEndTime());

Review comment:
       it can print the array elements directly as follows
   ![image](https://user-images.githubusercontent.com/67779101/124537523-a14d2380-de4c-11eb-9a00-78b8938f912f.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] yanhongwangg commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
yanhongwangg commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664211096



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -959,6 +961,11 @@ private void addRowRecordForShowQuery(
 
   @Override
   public void delete(DeletePlan deletePlan) throws QueryProcessException {
+    AUDIT_LOGGER.info(
+        "delete data from {} in [{},{}]",
+        deletePlan.getPaths(),
+        deletePlan.getDeleteStartTime(),
+        deletePlan.getDeleteEndTime());

Review comment:
       it can print the array elements directly as follows
   ![image](https://user-images.githubusercontent.com/67779101/124537523-a14d2380-de4c-11eb-9a00-78b8938f912f.png)
   

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -959,6 +961,11 @@ private void addRowRecordForShowQuery(
 
   @Override
   public void delete(DeletePlan deletePlan) throws QueryProcessException {
+    AUDIT_LOGGER.info(
+        "delete data from {} in [{},{}]",
+        deletePlan.getPaths(),
+        deletePlan.getDeleteStartTime(),
+        deletePlan.getDeleteEndTime());

Review comment:
       it can print  a list as follows
   ![image](https://user-images.githubusercontent.com/67779101/124538281-efaef200-de4d-11eb-96d3-d84f52ee0eed.png)
   

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1512,6 +1520,7 @@ private boolean alterTimeSeries(AlterTimeSeriesPlan alterTimeSeriesPlan)
 
   public boolean setStorageGroup(SetStorageGroupPlan setStorageGroupPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("set storage group to {}", setStorageGroupPlan.getPaths());
     PartialPath path = setStorageGroupPlan.getPath();

Review comment:
       The return value is same, but getPath will be better. I'll change it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] yanhongwangg commented on a change in pull request #3511: add audit log when execute delete and set sg for tracing

Posted by GitBox <gi...@apache.org>.
yanhongwangg commented on a change in pull request #3511:
URL: https://github.com/apache/iotdb/pull/3511#discussion_r664213312



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
##########
@@ -1512,6 +1520,7 @@ private boolean alterTimeSeries(AlterTimeSeriesPlan alterTimeSeriesPlan)
 
   public boolean setStorageGroup(SetStorageGroupPlan setStorageGroupPlan)
       throws QueryProcessException {
+    AUDIT_LOGGER.info("set storage group to {}", setStorageGroupPlan.getPaths());
     PartialPath path = setStorageGroupPlan.getPath();

Review comment:
       The return value is same, but getPath will be better. I'll change it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org