You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Minghui Liu (Jira)" <ji...@apache.org> on 2021/09/26 11:52:00 UTC
[jira] [Assigned] (IOTDB-1726) Wrong hashCode() and equals() method
in ChunkMetadata
[ https://issues.apache.org/jira/browse/IOTDB-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Minghui Liu reassigned IOTDB-1726:
----------------------------------
Assignee: Minghui Liu
> Wrong hashCode() and equals() method in ChunkMetadata
> -----------------------------------------------------
>
> Key: IOTDB-1726
> URL: https://issues.apache.org/jira/browse/IOTDB-1726
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Core/Engine
> Affects Versions: 0.12.2
> Reporter: Yuan Tian
> Assignee: Minghui Liu
> Priority: Major
>
> {code:java}
> @Override
> public boolean equals(Object o) {
> if (this == o) {
> return true;
> }
> if (o == null || getClass() != o.getClass()) {
> return false;
> }
> ChunkMetadata that = (ChunkMetadata) o;
> return offsetOfChunkHeader == that.offsetOfChunkHeader
> && version == that.version
> && Objects.equals(measurementUid, that.measurementUid)
> && tsDataType == that.tsDataType
> && Objects.equals(deleteIntervalList, that.deleteIntervalList)
> && Objects.equals(statistics, that.statistics);
> }
> @Override
> public int hashCode() {
> return Objects.hash(
> measurementUid, deleteIntervalList, tsDataType, statistics, version, offsetOfChunkHeader);
> }
> {code}
> We can see that chunkmetadata use version to differentiate, however, in different storage groups, different file's version may be same. That means root.sg1.d1.s1 and root.sg2.d1.s1 may share the same cache entry in ChunkCache
--
This message was sent by Atlassian Jira
(v8.3.4#803005)