Git Product home page Git Product logo

Comments (7)

oguzyildirim avatar oguzyildirim commented on June 11, 2024 1

Hello @Du-Li, that would be a good feature as far as I know we can get timestamps from CAS value but Couchbase Server should be 7.0 or later. We can add it as a feature maybe any ideas? @erayarslan @mhmtszr

from go-dcp-kafka.

Du-Li avatar Du-Li commented on June 11, 2024

That's awesome. Thanks for your quick attention.

It's a bit disappointing though that this timestamp is only available in CB 7.0 or above. Our current production is still using CB 6.5 and we won't be able to upgrade it in a short term. Is there some way to make it work for CB 6.5?

from go-dcp-kafka.

erayarslan avatar erayarslan commented on June 11, 2024

i checked version 6.5 of the couchbase. there doesn't seem to be a problem with this cas to eventTime conversion.

from go-dcp-kafka.

erayarslan avatar erayarslan commented on June 11, 2024

we implemented in v0.0.37
now you can use with event.EventTime

thank you so much for contribution💯

from go-dcp-kafka.

Du-Li avatar Du-Li commented on June 11, 2024

@erayarslan Thank you for implementing it. I have tested it. However, there was a big gap between this CAS-based timestamp (t2) and the timestamp (t1) I added into the doc when it was generated, actually t2 < t1 by up to a second.

Do you know how CAS was created? What's the physical meaning? I was wondering if it could be rightly used as the timestamp a doc is persisted on CB.

from go-dcp-kafka.

erayarslan avatar erayarslan commented on June 11, 2024

@Du-Li i think its mean "event happen time in couchbase"
so when document create in couchbase, this mutation cas is create time.
or document deleted in couchbase, deletion cas time is delete time.

so when you start consuming for the first time, it is normal to see this gap.
after initial load its done, you will get new fresh events. gap gonna normal.

@oguzyildirim also has idea about DcpTime kinda field to set time(now) when our library consume event.

from go-dcp-kafka.

oguzyildirim avatar oguzyildirim commented on June 11, 2024

There is only one edge case about CAS as far as I know. if conflict resolution is to take an older document from the backup it will affect metadata i.e CAS.

I've added dcp latency but not tested yet.

from go-dcp-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.