hongzhi-gao opened a new pull request, #783:
URL: https://github.com/apache/tsfile/pull/783

   ### 中文
   
   TSMIterator 内部用来聚合设备元数据的 map,键是 std::shared_ptr<IDeviceID>,但没有使用按设备值比较的 
comparator,默认按指针地址比较。
   结果就是:同一个逻辑设备(比如 d1)如果来自不同恢复轮次、指针不同,会被当成不同 key。
   在 TSMIterator 的设备聚合 map 上使用 IDeviceIDComparator,让 key 比较按设备内容而不是指针地址。
   
   ### English
   
   Inside `TSMIterator`, the map used to aggregate device metadata uses 
`std::shared_ptr<IDeviceID>` as the key, but it does not use a value-based 
comparator for devices; by default, it compares pointer addresses.
   
   As a result, the same logical device (for example, `d1`) coming from 
different recovery rounds can have different pointer instances and be treated 
as different keys.
   
   The fix is to use `IDeviceIDComparator` for the device-aggregation map in 
`TSMIterator`, so keys are compared by device identity/content instead of 
pointer address.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to