Giter Site home page Giter Site logo

AnalyticsDB atomic operations about das HOT 3 CLOSED

DMWMBot avatar DMWMBot commented on August 16, 2024
AnalyticsDB atomic operations

from das.

Comments (3)

vkuznet avatar vkuznet commented on August 16, 2024

valya: Related, how we should handle swap of data when existing data are still in cache. There are two scenarios:

  1. new data is identical to one in a cache, action: change timestamp
  2. new data is different from one in a cache.

This issue can be critical for expensive data requests, get all blocks/datasets.

from das.

vkuznet avatar vkuznet commented on August 16, 2024

valya: Hi Gordon,
instead of email I put it to trac. Somehow I don't get email updates, so we need to include CC for tickets.

I thought about atomic update of newly retrieved records from DAS robot with existing records presented in db. Here is the proposal:

  • add new field das.ahead for all records
    • if query hash not found in DB, das.ahead=0 and all records just added to DB otherwise
      add new field das.ahead=1 to all records and insert them as usual
    • at this step we will have 2 copy of data, one with das.ahead=0 and visible to users
      and another with das.ahead=1 which can be used by das web to not show such records
  • once we ready to perform a swap
    1. perform records removal for the same query hash && das.ahead=0
    2. perform atomic update (find in mongo docs) of records with given query hash and das.ahead=1
      • change das.ahead to 0 during this operation.

This will require to add das.ahead field and also some manipulation in mongocache code for both DAS cache and DAS merge collections.

Please let me know what do you think,
V.

from das.

vkuznet avatar vkuznet commented on August 16, 2024

valya: I don't think this use case is valid anymore, therefore closing the ticket. Will re-open if use case will show up again.

from das.

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.