Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
9cbae0f9
Commit
9cbae0f9
authored
Aug 31, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: enhance tdb1 porting document.
parent
e42097b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
ccan/tdb2/doc/TDB1_porting.txt
ccan/tdb2/doc/TDB1_porting.txt
+28
-0
No files found.
ccan/tdb2/doc/TDB1_porting.txt
View file @
9cbae0f9
...
...
@@ -42,3 +42,31 @@ Interface differences between TDB1 and TDB2.
tdb_lockall_read(): child must call tdb_unlockall_read()
tdb_chainlock(): child must call tdb_chainunlock()
tdb_parse() callback: child must return from tdb_parse()
- tdb2 will not open a non-tdb file, even if O_CREAT is specified.
- There is no tdb_traverse_read. For operating on TDB1 files, you can
simulate it by tdb_add_flag(tdb, TDB_RDONLY); tdb_traverse();
tdb_remove_flag(tdb, TDB_RDONLY). This may be desirable because
traverse on TDB1 files use a write lock on the entire database
unless it's read-only.
- Failure inside a transaction (such as a lock function failing) does
not implicitly cancel the transaction; you still need to call
tdb_transaction_cancel().
TDB1 Compatibility:
- tdb2's offers a tdb1_incompatible_hash function, which is the same
as the default hash with the TDB_INCOMPATIBLE_HASH flag. There is
no way of marking an old TDB incompatible with versions < 1.2.6
while using any other hash.
- The TDB_ATTRIBUTE_TDB1_HASHSIZE attribute can be used to control the
hash size, but only when creating (ie. O_CREAT) a TDB1
(ie. TDB_VERSION1).
- There is no TDB_CLEAR_IF_FIRST flag; it has severe scalability and
API problems. If necessary, you can emulate this by using the open
hook and placing a 1-byte lock at offset 4. If your program forks,
you will need to place this lock again in the child.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment