Comments (6)
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.
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.
If we use the NoPagedBd class, then I think it's the same as allowing in-memory changes.
from tupl.
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.
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.
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)
- Support atomic move operation HOT 1
- Sorter sometimes drops extra entries when eliminating duplicates HOT 8
- Cursor skip and count methods might skip too much HOT 2
- How to run tests with NetBeans/Maven? HOT 3
- Add method to wait until the local member has become the leader HOT 1
- Recover transactions with multiple threads
- Speed up snapshots HOT 1
- Support transactional index creation
- Reduce syncCommit gossip
- Don't dirty leaf node when splitting on an edge HOT 1
- Improve hole filling
- Support voter membership role
- Push v1.4.4 to maven central HOT 2
- Allow leader to pull data from other members
- Compaction skips fragmented keys HOT 2
- Support default columns HOT 1
- Support cached columns HOT 1
- Define a node flag which indicates it only contains small keys HOT 1
- Define a Table re-encode method
- Database verfication should examine checksums HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tupl.