Hi, Liang,

Currently, we store the MD5 of the record key in OffsetMap. Since it has a
large domain (16 bytes), we assume there is no collision there.

Thanks,

Jun

On Wed, Mar 2, 2022 at 1:20 AM 阮良 <ruanliang_hua...@163.com> wrote:

> Hi all
>
> I am confused about the Log Compaction logic,use OffsetMap
> to deduplicating the log.   in my opinion when there is a hash conflict ,
> data may be lost
> Eg:                 Record1(key1,offset1)  Record2(key2,offset2)
> Condition        hash(key1) == hash(key2)   &&  (offset1 < offset2)
> *Result              Record1 will be remove by mistake *
>
>
>    - Did I misunderstand the implementation logic?    please give me some
>    guidance, thank you very much
>
>
> *1:OffsetMap  put logic does not deal with the hash collision, if
> hash(key1) == hash(key2)    key1 will be overwrire*
>
>
>
>
> 2:the logic of retain record
>
>

Reply via email to