You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/10/13 15:05:35 UTC

[iotdb] branch fix_new_server_concurrent created (now 853e326f80)

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

haonan pushed a change to branch fix_new_server_concurrent
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 853e326f80 fix concurrent bug of creating new DataRegion in new_iotdb

This branch includes the following new commits:

     new 853e326f80 fix concurrent bug of creating new DataRegion in new_iotdb

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: fix concurrent bug of creating new DataRegion in new_iotdb

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_new_server_concurrent
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 853e326f805a135856acfa8ca792b9ed0527bb18
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Oct 13 23:05:16 2022 +0800

    fix concurrent bug of creating new DataRegion in new_iotdb
---
 .../org/apache/iotdb/db/localconfignode/LocalDataPartitionTable.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalDataPartitionTable.java b/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalDataPartitionTable.java
index d52afe32cf..7e0455207b 100644
--- a/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalDataPartitionTable.java
+++ b/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalDataPartitionTable.java
@@ -77,7 +77,7 @@ public class LocalDataPartitionTable {
     return Arrays.asList(regionIds);
   }
 
-  public DataRegionId getDataRegionWithAutoExtension(PartialPath path) {
+  public synchronized DataRegionId getDataRegionWithAutoExtension(PartialPath path) {
     int idx = Math.abs(path.hashCode() % regionNum);
     if (regionIds[idx] == null) {
       int nextId = DataRegionIdGenerator.getInstance().getNextId();