Hi,

There is a need to retrieve the NTP time from Couchbase DCP packet.

I found XDCR Opcode, Set with Meta Request, contains additional CAS in the extras.

Does this one means the HLC? referred to https://github.com/couchbase/goxdcr/blob/master/docs/sherlock_xdcr_lww_design.md.

After got some knowledge from

**.**

**Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases**```
We propose the following scheme for combining l and
c and storing it in single 64 bit timestamp. This scheme
involves restricting l to track only the most significant 48
bits of pt in the HLC algorithm presented in Figure 5.
Rounding up pt values to 48 bits l values still gives us
microsecond granularity tracking of pt. Given NTP synchronization levels, this is sufficient granularity to represent NTP time. The way we round up pt is to always take
the ceiling to the 48th bit. In the HLC algorithm in Figure 5, l is updated similarly but is done for 48 bits. When
the l values remain unchanged in an event, we capture
that by incrementing c following the HLC algorithm in
Figure 5. 16 bits remain for c and allows it room to grow
up to 65536, which is more than enough as we show in
our experiments in Section 5
```

I am confused about the CAS.

The first 48 bit in the CAS does not conform to the NTP time when the key were mutated, the first 32 bits of CAS should starts with “e06”, however, it starts with “159”

Any help would be appreciated.