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
a2191edc
Commit
a2191edc
authored
Mar 17, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: merge changes in design document.
parent
f6067e4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
83 deletions
+6
-83
ccan/tdb2/doc/design.lyx
ccan/tdb2/doc/design.lyx
+6
-83
No files found.
ccan/tdb2/doc/design.lyx
View file @
a2191edc
...
...
@@ -35,7 +35,7 @@
\paperpagestyle default
\tracking_changes true
\output_changes true
\author "
Rusty Russell,,,
"
\author ""
\author ""
\end_header
...
...
@@ -50,7 +50,7 @@ Rusty Russell, IBM Corporation
\end_layout
\begin_layout Date
1
-December-2010
1
7-March-2011
\end_layout
\begin_layout Abstract
...
...
@@ -698,13 +698,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1298979572
Incomplete; nesting flag is still defined as per tdb1.
\change_inserted 0 1298979584
Complete; the nesting flag has been removed.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -785,12 +779,6 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1300360559
Incomplete.
TDB_VOLATILE still defined, but implementation should fail on unknown flags
to be future-proof.
\change_inserted 0 1300360588
Complete.
Unknown flags cause tdb_open() to fail as well, so they can be detected
at runtime.
...
...
@@ -853,13 +841,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1300360823
Incomplete.
\change_inserted 0 1300360824
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -888,34 +870,15 @@ Proposed Solution
\begin_layout Standard
Reachitecting the API to include a tdb_errcode pointer would be a great
deal of churn
\change_inserted 0 1298979557
, but fortunately most functions return 0 on success and -1 on error: we
can change these to return 0 on success and a negative error code on error,
and the API remains similar to previous.
deal of churn, but fortunately most functions return 0 on success and -1
on error: we can change these to return 0 on success and a negative error
code on error, and the API remains similar to previous.
The tdb_fetch, tdb_firstkey and tdb_nextkey functions need to take a TDB_DATA
pointer and return an error code.
It is also simpler to have tdb_nextkey replace its key argument in place,
freeing up any old .dptr.
\end_layout
\begin_layout Standard
\change_deleted 0 1298979438
; we are better to guarantee that the tdb_errcode is per-thread so the current
programming model can be maintained.
\end_layout
\begin_layout Standard
\change_deleted 0 1298979438
This requires dynamic per-thread allocations, which is awkward with POSIX
threads (pthread_key_create space is limited and we cannot simply allocate
a key for every TDB).
\change_unchanged
\end_layout
\begin_layout Standard
Internal locking is required to make sure that fcntl locks do not overlap
between threads, and also that the global list of tdbs is maintained.
...
...
@@ -939,13 +902,7 @@ Status
\end_layout
\begin_layout Standard
Incomplete
\change_inserted 0 1298979681
; API has been changed but thread safety has not been implemented.
\change_deleted 0 1298979669
.
\change_unchanged
Incomplete; API has been changed but thread safety has not been implemented.
\end_layout
\begin_layout Subsection
...
...
@@ -1288,13 +1245,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1300360712
Incomplete.
\change_inserted 0 1300360716
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -1339,13 +1290,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1298979699
Incomplete, TDB_CLEAR_IF_FIRST still defined, but not implemented.
\change_inserted 0 1298979700
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -1404,13 +1349,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1300360753
Incomplete.
\change_inserted 0 1300360754
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -1440,13 +1379,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1300360766
Incomplete.
\change_inserted 0 1300360767
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -1563,13 +1496,7 @@ Status
\end_layout
\begin_layout Standard
\change_deleted 0 1298979837
Incomplete; TDB_CLEAR_IF_FIRST still defined, but does nothing.
\change_inserted 0 1298979837
Complete.
\change_unchanged
\end_layout
\begin_layout Subsection
...
...
@@ -2309,10 +2236,6 @@ struct tdb_free_record {
\end_layout
\begin_layout Standard
\change_deleted 0 1291206079
\change_unchanged
Note that by limiting valid offsets to 56 bits, we can pack everything we
need into 3 64-byte words, meaning our minimum record size is 8 bytes.
\end_layout
...
...
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