Giter Club home page Giter Club logo

Comments (7)

senthil-db-expert avatar senthil-db-expert commented on May 22, 2024 1

@apkar We like to take up this ticket. The proposed solution is,

  • Register new command for Rename
  • Validate the collection name for existence
  • Use MOVE function to create and update the directory path
  • Add internal_doDropIndexesActor function to update system.indexes

Please assign it to me, if this is ok.

from fdb-document-layer.

senthil-db-expert avatar senthil-db-expert commented on May 22, 2024 1

@apkar the fix is ready. We will be raising PR today under account drkannan

from fdb-document-layer.

apkar avatar apkar commented on May 22, 2024

@senthil-db-expert Why do you need to drop the indexes ?

from fdb-document-layer.

apkar avatar apkar commented on May 22, 2024

If we take a simple case with a collection and index like below

db = client['test']
db.coll.create_index('field_a')
db.coll.insert_one({'field_a': 'value_a_1', '_id': 'Bhaskar'})

Assuming it creates directory structure like below

●
├── Status Monitor -> \x15\x35
│   └── Layers -> \x15\x08
└── document -> \x15\x1c
    └── test -> \x15\x1d
        ├── coll -> \x15\x07
        │   └── metadata -> \x15\x2c
        └── system.indexes -> \x15\x16
            └── metadata -> \x15\x31

We will have primary index

`\x15\x07(Bhaskar\x00' is `2'
`\x15\x07(Bhaskar\x00(_id\x00' is `(Bhaskar'
`\x15\x07(Bhaskar\x00(field_a\x00' is `(value_a_1'

And secondary index

`\x15\x2c(indices\x00(field_a\x00(value_a_1\x00(Bhaskar\x00' is `'

We don't have to rewrite any of the primary/secondary index keys. We will need to rename (or move) the directory path and change the entry in system.indexes to point to new namespace. And it should bump the metadata version for the collection.

from fdb-document-layer.

senthil-db-expert avatar senthil-db-expert commented on May 22, 2024

Agree @apkar Thanks. Will work on it and raise the PR.

from fdb-document-layer.

senthil-db-expert avatar senthil-db-expert commented on May 22, 2024

@apkar any reason why this issue still in open state? Like to understand the process.

from fdb-document-layer.

apkar avatar apkar commented on May 22, 2024

Usually, if a single PR is closing an issue, we go with the following keywords which would automatically close the issue.

https://help.github.com/en/articles/closing-issues-using-keywords

Also, it's just me being lazy.

from fdb-document-layer.

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.