Giter Club home page Giter Club logo

Comments (6)

broneill avatar broneill commented on June 3, 2024

This involves more than opening the db file(s) in read-only mode. Log files cannot be deleted/created, the info file cannot be overwritten, the lock file cannot be created. Checkpoints are disabled and recovery must not checkpoint either. Snapshots don't create a temp database.

Should in-memory changes be allowed, but just not be writable? This isn't a true read-only mode, but instead, a non-persistable mode. Like a non-durable database, the cache can become exhausted.

from tupl.

tylaar avatar tylaar commented on June 3, 2024

for Supporting ReadOnly mode, is it necessary to create a new PagedDB subClass which provides the functionality of reading values from DB, but disable all the writing functions inside ? Or we reuse the DurablePageDb class and check the readOnly mode inside to perform the operations ?

from tupl.

tylaar avatar tylaar commented on June 3, 2024

If we use the NoPagedBd class, then I think it's the same as allowing in-memory changes.

from tupl.

broneill avatar broneill commented on June 3, 2024

I think the mode should be "fileReadOnly(true)", and allow changes to made in-memory. The PageArray is opened in read-only mode, preventing writes. New checks are required for providing better exceptions.

from tupl.

tylaar avatar tylaar commented on June 3, 2024

I've been modifying in my fork for readOnly in a lot fields, I found that multiple choices are available for supporting readOnly. For instance, RedoWriter, in my perspective, since ReadOnly mode will not allow RedoLog/UndoLog creation, one possible way to do it is to create a DummyRedoWriter, which inside, write. checkpoint functions will just pass and do nothing. Another way is to throw ReadOnlyModeException during certain API call, like someone wants to call checkpoint on Database class. Are these two ways all acceptable ?

from tupl.

tylaar avatar tylaar commented on June 3, 2024

Another question is for Snapshot function. If snapshot isn't allowed to create TempDatabase, then how can we do it ? Directly snapshot to memory only ?

from tupl.

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.