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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
39293a20
Commit
39293a20
authored
Jan 02, 2008
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work on recovery bug. Addresses #27.
git-svn-id:
file:///svn/tokudb@1461
c7de825b-a66e-492c-adef-691d508d4ae1
parent
8ca9b0bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
newbrt/brt.c
newbrt/brt.c
+6
-1
newbrt/recover.c
newbrt/recover.c
+1
-1
No files found.
newbrt/brt.c
View file @
39293a20
...
...
@@ -199,11 +199,16 @@ void toku_brtnode_flush_callback (CACHEFILE cachefile, DISKOFF nodename, void *b
int
toku_brtnode_fetch_callback
(
CACHEFILE
cachefile
,
DISKOFF
nodename
,
void
**
brtnode_pv
,
long
*
sizep
,
void
*
extraargs
,
LSN
*
written_lsn
)
{
BRT
t
=
(
BRT
)
extraargs
;
BRTNODE
*
result
=
(
BRTNODE
*
)
brtnode_pv
;
printf
(
"result=%p written_lsn=%p
\n
"
,
result
,
written_lsn
);
int
r
=
toku_deserialize_brtnode_from
(
toku_cachefile_fd
(
cachefile
),
nodename
,
result
,
t
->
flags
,
t
->
nodesize
,
t
->
compare_fun
,
t
->
dup_compare
,
t
->
db
,
toku_cachefile_filenum
(
t
->
cf
));
if
(
r
==
0
)
*
sizep
=
brtnode_size
(
*
result
);
printf
(
"result=%p written_lsn=%p
\n
"
,
result
,
written_lsn
);
printf
(
"disk_lsn=%lld
\n
"
,
(
*
result
)
->
disk_lsn
.
lsn
);
printf
(
"ok
\n
"
);
*
written_lsn
=
(
*
result
)
->
disk_lsn
;
printf
(
"ok
\n
"
);
//(*result)->parent_brtnode = 0; /* Don't know it right now. */
//printf("%s:%d installed %p (offset=%lld)\n", __FILE__, __LINE__, *result, nodename);
return
r
;
...
...
@@ -327,7 +332,7 @@ static void initialize_brtnode (BRT t, BRTNODE n, DISKOFF nodename, int height)
}
else
{
int
r
=
toku_pma_create
(
&
n
->
u
.
l
.
buffer
,
t
->
compare_fun
,
t
->
db
,
toku_cachefile_filenum
(
t
->
cf
),
n
->
nodesize
);
assert
(
r
==
0
);
toku_pma_set_dup_mode
(
n
->
u
.
l
.
buffer
,
t
->
flags
&
(
TOKU_DB_DUP
+
TOKU_DB_DUPSORT
));
toku_pma_set_dup_mode
(
n
->
u
.
l
.
buffer
,
t
->
flags
&
(
TOKU_DB_DUP
|
TOKU_DB_DUPSORT
));
toku_pma_set_dup_compare
(
n
->
u
.
l
.
buffer
,
t
->
dup_compare
);
static
int
rcount
=
0
;
//printf("%s:%d n PMA= %p (rcount=%d)\n", __FILE__, __LINE__, n->u.l.buffer, rcount);
...
...
newbrt/recover.c
View file @
39293a20
...
...
@@ -110,7 +110,7 @@ static void toku_recover_newbrtnode (struct logtype_newbrtnode *c) {
TAGMALLOC
(
BRTNODE
,
n
);
n
->
nodesize
=
c
->
nodesize
;
n
->
thisnodename
=
c
->
diskoff
;
n
->
log_lsn
=
n
->
disk_lsn
=
c
->
lsn
;
n
->
log_lsn
=
n
->
disk_lsn
=
c
->
lsn
;
printf
(
"%s:%d %p->disk_lsn=%lld
\n
"
,
__FILE__
,
__LINE__
,
n
,
n
->
disk_lsn
.
lsn
);
n
->
layout_version
=
0
;
n
->
parent_brtnode
=
0
;
n
->
height
=
c
->
height
;
...
...
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