You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/08/22 14:39:43 UTC

[iotdb] 01/04: merge with master

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

hxd pushed a commit to branch cluster-
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit a2519c6aa77045533508b9ee4f2c6b5c460beedb
Merge: e47afa9 89bcef8
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Wed Aug 18 23:12:25 2021 +0800

    merge with master

 .../antlr4/org/apache/iotdb/db/qp/sql/SqlBase.g4   |  30 ++-
 docs/SystemDesign/SchemaManager/SchemaManager.md   |   2 +-
 docs/UserGuide/Appendix/SQL-Reference.md           |   8 +
 .../DML-Data-Manipulation-Language.md              |   4 +-
 .../IoTDB-SQL-Language/Maintenance-Command.md      |  28 ++-
 .../zh/SystemDesign/SchemaManager/SchemaManager.md |   2 +-
 docs/zh/UserGuide/Appendix/SQL-Reference.md        |   9 +
 .../DDL-Data-Definition-Language.md                |  45 ++--
 .../DML-Data-Manipulation-Language.md              |   6 +-
 .../IoTDB-SQL-Language/Maintenance-Command.md      |  31 ++-
 .../resources/conf/iotdb-engine.properties         |   2 +
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java |   2 +-
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  |   7 +
 .../engine/storagegroup/StorageGroupProcessor.java |  21 +-
 .../apache/iotdb/db/qp/constant/SQLConstant.java   |   2 +
 .../apache/iotdb/db/qp/executor/PlanExecutor.java  |   8 +
 .../org/apache/iotdb/db/qp/logical/Operator.java   |   3 +-
 .../db/qp/logical/sys/SetSystemModeOperator.java   |  53 ++++
 .../db/qp/physical/sys/SetSystemModePlan.java      |  46 ++++
 .../apache/iotdb/db/qp/sql/IoTDBSqlVisitor.java    |  20 +-
 .../iotdb/db/rescon/PrimitiveArrayManager.java     |  17 +-
 .../org/apache/iotdb/db/service/TSServiceImpl.java |  14 +-
 .../writelog/manager/MultiFileLogNodeManager.java  |   9 +-
 .../db/writelog/node/ExclusiveWriteLogNode.java    |  84 +++----
 .../apache/iotdb/db/integration/IoTDBFillIT.java   |   2 +-
 .../IoTDBSetSystemReadOnlyWritableIT.java          | 266 +++++++++++++++++++++
 .../aggregation/IoTDBAggregationSmallDataIT.java   |   8 +-
 .../.vuepress/public/img/contributor-avatar/cw.jpg | Bin 163226 -> 163225 bytes
 .../read/expression/util/ExpressionOptimizer.java  |  34 +--
 .../tsfile/write/MetadataIndexConstructorTest.java |   3 +-
 30 files changed, 612 insertions(+), 154 deletions(-)

diff --cc server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
index dfd689e,56fafe2..e95f73a
--- a/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
@@@ -56,23 -57,19 +57,24 @@@ public class ExclusiveWriteLogNode impl
  
    private ILogWriter currentFileWriter;
  
-   private IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
+   private final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
  
-   private ByteBuffer logBufferWorking;
-   private ByteBuffer logBufferIdle;
-   private ByteBuffer logBufferFlushing;
+   private volatile ByteBuffer logBufferWorking;
+   private volatile ByteBuffer logBufferIdle;
+   private volatile ByteBuffer logBufferFlushing;
  
    // used for the convenience of deletion
-   private ByteBuffer[] bufferArray;
+   private volatile ByteBuffer[] bufferArray;
  
    private final Object switchBufferCondition = new Object();
-   private ReentrantLock lock = new ReentrantLock();
-   private static final ExecutorService FLUSH_BUFFER_THREAD_POOL =
-       IoTDBThreadPoolFactory.newCachedThreadPoolWithDaemon("Flush-WAL-Thread");
++
 +  // TODO: FLUSH_BUFFER_THREAD_POOL =
 +  //        IoTDBThreadPoolFactory.newSingleThreadExecutor(
 +  //            "Flush-WAL-Thread-" + SystemFileFactory.INSTANCE.getFile(logDirectory).getName());
 +
+   private final ReentrantLock lock = new ReentrantLock();
+   private final ExecutorService FLUSH_BUFFER_THREAD_POOL;
+ 
    private long fileId = 0;
    private long lastFlushedId = 0;