This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new c746da2faec Deleted the useless read lock in getDeviceAttribute
c746da2faec is described below
commit c746da2faecbe06ec9d9cf2b19ae976a3d42df6d
Author: Caideyipi <[email protected]>
AuthorDate: Fri Mar 28 19:53:00 2025 +0800
Deleted the useless read lock in getDeviceAttribute
---
.../metadata/fetcher/cache/TableDeviceSchemaCache.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java
index ea4c415b1ae..a724bc427c8 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java
@@ -137,14 +137,9 @@ public class TableDeviceSchemaCache {
// The input deviceId shall have its tailing nulls trimmed
public Map<String, Binary> getDeviceAttribute(final String database, final
IDeviceID deviceId) {
- readWriteLock.readLock().lock();
- try {
- final TableDeviceCacheEntry entry =
- dualKeyCache.get(new TableId(database, deviceId.getTableName()),
deviceId);
- return entry == null ? null : entry.getAttributeMap();
- } finally {
- readWriteLock.readLock().unlock();
- }
+ final TableDeviceCacheEntry entry =
+ dualKeyCache.get(new TableId(database, deviceId.getTableName()),
deviceId);
+ return entry == null ? null : entry.getAttributeMap();
}
// The input deviceId shall have its tailing nulls trimmed