You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xu...@apache.org on 2021/12/17 06:49:42 UTC

[iotdb] 03/06: fix synchronization bug

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

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

commit 7a34ac11eb5428936af5af70957555548412eab7
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Thu Dec 16 16:04:33 2021 +0800

    fix synchronization bug
---
 .../org/apache/iotdb/db/metadata/id_table/entry/SHA256DeviceID.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/id_table/entry/SHA256DeviceID.java b/server/src/main/java/org/apache/iotdb/db/metadata/id_table/entry/SHA256DeviceID.java
index 0e7b30b..b96333c 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/id_table/entry/SHA256DeviceID.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/id_table/entry/SHA256DeviceID.java
@@ -66,7 +66,7 @@ public class SHA256DeviceID implements IDeviceID {
    *
    * @param deviceID device path
    */
-  private void buildSHA256(String deviceID) {
+  private synchronized void buildSHA256(String deviceID) {
     byte[] hashVal = md.digest(deviceID.getBytes());
     md.reset();