Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
917a127c
Commit
917a127c
authored
Jun 10, 2008
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed toku_rt_forest to rt_forest
git-svn-id:
file:///svn/tokudb@4453
c7de825b-a66e-492c-adef-691d508d4ae1
parent
750998c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
src/lock_tree/locktree.c
src/lock_tree/locktree.c
+10
-10
src/lock_tree/rth.c
src/lock_tree/rth.c
+2
-2
src/lock_tree/rth.h
src/lock_tree/rth.h
+5
-5
src/lock_tree/tests/test_00030_rth.c
src/lock_tree/tests/test_00030_rth.c
+1
-1
No files found.
src/lock_tree/locktree.c
View file @
917a127c
...
...
@@ -374,7 +374,7 @@ static inline int toku__p_makecopy(toku_lock_tree* tree, toku_point** ppoint) {
Returns NULL if it does not exist yet. */
toku_range_tree
*
toku__lt_ifexist_selfread
(
toku_lock_tree
*
tree
,
TXNID
txn
)
{
assert
(
tree
);
toku_
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
return
forest
?
forest
->
self_read
:
NULL
;
}
...
...
@@ -383,7 +383,7 @@ toku_range_tree* toku__lt_ifexist_selfread(toku_lock_tree* tree, TXNID txn) {
toku_range_tree
*
toku__lt_ifexist_selfwrite
(
toku_lock_tree
*
tree
,
TXNID
txn
)
{
assert
(
tree
);
toku_
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
return
forest
?
forest
->
self_write
:
NULL
;
}
...
...
@@ -409,7 +409,7 @@ static inline int toku__lt_selfread(toku_lock_tree* tree, TXNID txn,
int
r
=
ENOSYS
;
assert
(
tree
&&
pselfread
);
toku_
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
if
(
!
forest
)
{
/* Neither selfread nor selfwrite exist. */
r
=
toku__lt_add_locked_txn
(
tree
,
txn
);
...
...
@@ -438,7 +438,7 @@ static inline int toku__lt_selfwrite(toku_lock_tree* tree, TXNID txn,
int
r
=
ENOSYS
;
assert
(
tree
&&
pselfwrite
);
toku_
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
rt_forest
*
forest
=
toku_rth_find
(
tree
->
rth
,
txn
);
if
(
!
forest
)
{
/* Neither selfread nor selfwrite exist. */
r
=
toku__lt_add_locked_txn
(
tree
,
txn
);
...
...
@@ -1346,7 +1346,7 @@ int toku_lt_close(toku_lock_tree* tree) {
if
(
!
first_error
&&
r
!=
0
)
{
first_error
=
r
;
}
toku_rth_start_scan
(
tree
->
rth
);
toku_
rt_forest
*
forest
;
rt_forest
*
forest
;
while
((
forest
=
toku_rth_next
(
tree
->
rth
))
!=
NULL
)
{
r
=
toku__lt_free_contents
(
tree
,
forest
->
self_read
,
NULL
);
...
...
@@ -1438,7 +1438,7 @@ static inline int toku__lt_write_range_conflicts_reads(toku_lock_tree* tree,
int
r
=
0
;
BOOL
met
=
FALSE
;
toku_rth_start_scan
(
tree
->
rth
);
toku_
rt_forest
*
forest
;
rt_forest
*
forest
;
while
((
forest
=
toku_rth_next
(
tree
->
rth
))
!=
NULL
)
{
if
(
forest
->
self_read
!=
NULL
&&
toku__lt_txn_cmp
(
forest
->
hash_key
,
txn
))
{
...
...
@@ -1628,7 +1628,7 @@ static inline int toku__lt_do_escalation(toku_lock_tree* tree) {
r
=
toku__lt_escalate_write_locks
(
tree
);
if
(
r
!=
0
)
{
goto
cleanup
;
}
toku_
rt_forest
*
forest
;
rt_forest
*
forest
;
toku_rth_start_scan
(
tree
->
rth
);
while
((
forest
=
toku_rth_next
(
tree
->
rth
))
!=
NULL
)
{
if
(
forest
->
self_read
)
{
...
...
@@ -2006,7 +2006,7 @@ static inline int toku__lt_border_delete(toku_lock_tree* tree, toku_range_tree*
static
inline
int
toku__lt_defer_unlocking_txn
(
toku_lock_tree
*
tree
,
TXNID
txnid
)
{
int
r
=
ENOSYS
;
toku_
rt_forest
*
forest
=
toku_rth_find
(
tree
->
txns_to_unlock
,
txnid
);
rt_forest
*
forest
=
toku_rth_find
(
tree
->
txns_to_unlock
,
txnid
);
/* Should not be unlocking a transaction twice. */
assert
(
!
forest
);
r
=
toku_rth_insert
(
tree
->
txns_to_unlock
,
txnid
);
...
...
@@ -2057,7 +2057,7 @@ static inline int toku__lt_unlock_txn(toku_lock_tree* tree, TXNID txn) {
static
inline
int
toku__lt_unlock_deferred_txns
(
toku_lock_tree
*
tree
)
{
int
r
=
ENOSYS
;
toku_rth_start_scan
(
tree
->
txns_to_unlock
);
toku_
rt_forest
*
forest
=
NULL
;
rt_forest
*
forest
=
NULL
;
while
((
forest
=
toku_rth_next
(
tree
->
txns_to_unlock
))
!=
NULL
)
{
/* This can only fail with a panic so it is fine to quit immediately. */
r
=
toku__lt_unlock_txn
(
tree
,
forest
->
hash_key
);
...
...
@@ -2078,7 +2078,7 @@ static inline void toku__lt_clear(toku_lock_tree* tree) {
toku_rt_clear
(
tree
->
borderwrite
);
toku_rth_start_scan
(
tree
->
rth
);
toku_
rt_forest
*
forest
;
rt_forest
*
forest
;
u_int32_t
ranges
=
0
;
while
((
forest
=
toku_rth_next
(
tree
->
rth
))
!=
NULL
)
{
u_int32_t
size
;
...
...
src/lock_tree/rth.c
View file @
917a127c
...
...
@@ -61,7 +61,7 @@ int toku_rth_create(toku_rth** prth,
return
r
;
}
toku_
rt_forest
*
toku_rth_find
(
toku_rth
*
rth
,
TXNID
key
)
{
rt_forest
*
toku_rth_find
(
toku_rth
*
rth
,
TXNID
key
)
{
assert
(
rth
);
u_int32_t
index
=
toku__rth_hash
(
rth
,
key
);
...
...
@@ -89,7 +89,7 @@ static inline toku_rth_elt* toku__rth_next(toku_rth* rth) {
return
rth
->
iter_curr
;
}
toku_
rt_forest
*
toku_rth_next
(
toku_rth
*
rth
)
{
rt_forest
*
toku_rth_next
(
toku_rth
*
rth
)
{
assert
(
rth
);
toku_rth_elt
*
next
=
toku__rth_next
(
rth
);
return
rth
->
iter_curr
!=
&
rth
->
iter_head
?
&
next
->
value
:
NULL
;
...
...
src/lock_tree/rth.h
View file @
917a127c
...
...
@@ -16,8 +16,8 @@
#include <brttypes.h>
#include <rangetree.h>
typedef
struct
__
toku_rt_forest
toku_
rt_forest
;
struct
__
toku_
rt_forest
{
typedef
struct
__
rt_forest
rt_forest
;
struct
__rt_forest
{
TXNID
hash_key
;
toku_range_tree
*
self_read
;
toku_range_tree
*
self_write
;
...
...
@@ -25,7 +25,7 @@ struct __toku_rt_forest {
typedef
struct
__toku_rth_elt
toku_rth_elt
;
struct
__toku_rth_elt
{
toku_
rt_forest
value
;
rt_forest
value
;
toku_rth_elt
*
next_in_bucket
;
toku_rth_elt
*
next_in_iteration
;
toku_rth_elt
*
prev_in_iteration
;
...
...
@@ -52,11 +52,11 @@ int toku_rth_create(toku_rth** ptable,
void
(
*
user_free
)
(
void
*
),
void
*
(
*
user_realloc
)(
void
*
,
size_t
));
toku_
rt_forest
*
toku_rth_find
(
toku_rth
*
table
,
TXNID
key
);
rt_forest
*
toku_rth_find
(
toku_rth
*
table
,
TXNID
key
);
void
toku_rth_start_scan
(
toku_rth
*
table
);
toku_
rt_forest
*
toku_rth_next
(
toku_rth
*
table
);
rt_forest
*
toku_rth_next
(
toku_rth
*
table
);
void
toku_rth_delete
(
toku_rth
*
table
,
TXNID
key
);
...
...
src/lock_tree/tests/test_00030_rth.c
View file @
917a127c
...
...
@@ -35,7 +35,7 @@ int main(int argc, const char *argv[]) {
r
=
toku_rth_insert
(
rth
,
(
TXNID
)
i
);
CKERR
(
r
);
}
toku_
rt_forest
*
f
;
rt_forest
*
f
;
for
(
i
=
1
;
i
<
iterations
;
i
++
)
{
f
=
toku_rth_find
(
rth
,
(
TXNID
)
i
);
assert
(
f
);
...
...
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