Skip Menu |
 

From: tlyu@mit.edu
Subject: git commit
Download (untitled) / with headers
text/plain 1.1KiB

Refactor btree recursive traversal code

Previous releases had a nonstandard entry point (bt_rseq) into libdb2
to perform recursive traversal of a btree database that might be
corrupt so that an operator could attempt data recovery. This entry
point became inaccessible to user commands after krb5-1.5 due to
integration of the DAL.

Refactor the recursive traversal code into the existing btree
sequential traversal code, accepting new movement flags R_RNEXT
(recursively advance to next item) and R_RPREV.

Add commands to the libdb2 btree test program bttest to exercise this
functionality. Fix up the existing "rlist" command of bttest to use
the updated interface.

https://github.com/krb5/krb5/commit/590af488351316b6f4ddb70ce67a2730b4fcc40d
Author: Tom Yu <tlyu@mit.edu>
Commit: 590af488351316b6f4ddb70ce67a2730b4fcc40d
Branch: master
src/plugins/kdb/db2/libdb2/btree/bt_seq.c | 489 ++++----------------
src/plugins/kdb/db2/libdb2/btree/extern.h | 9 -
src/plugins/kdb/db2/libdb2/include/db.hin | 19 +-
src/plugins/kdb/db2/libdb2/libdb.exports | 1 -
src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | 56 ++-
5 files changed, 171 insertions(+), 403 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Add bttest unlink page command

To enable testing of recursive btree traversal, add an unlink page
command to the bttest program (used for debugging the libdb2 btree
back end). This new bttest command can unlink a specified page
number, or it can search for and unlink a page that has both a left
and a right sibling. (The user can specify whether to find an
internal page or a leaf page.)

This unlinking makes the page inaccessible to conventional sequential
traversal, simulating some btree corruption that has been seen in the
field.

https://github.com/krb5/krb5/commit/f7e4078de12cb77fa55e3f6aaa8137c1ced2e796
Author: Tom Yu <tlyu@mit.edu>
Commit: f7e4078de12cb77fa55e3f6aaa8137c1ced2e796
Branch: master
src/plugins/kdb/db2/libdb2/btree/bt_delete.c | 3 +-
src/plugins/kdb/db2/libdb2/btree/extern.h | 8 +-
src/plugins/kdb/db2/libdb2/libdb.exports | 1 +
src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | 88 ++++++++++++++++++++
4 files changed, 94 insertions(+), 6 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Recursive btree traversal test case

Add an unlink page command to the dbtest program. This dbtest command
finds a page that has both a left and a right neighbor and unlinks it,
making it inaccessible to conventional sequential traversal. This
simulates some btree corruption that has been seen in the field.

Unlike the bttest command, the dbtest unlink command always searches
for a leaf page with both a left and a right sibling, and doesn't
allow the user to specify internal pages or a specific page number.

Add a new dbtest command to recursively dump a btree database.

Add a new test case to run.test that uses these new commands to verify
the correct functioning of the recursive btree traversal options.

https://github.com/krb5/krb5/commit/b88630244995b5a8c7aee29240ced957cf8d7fdb
Author: Tom Yu <tlyu@mit.edu>
Commit: b88630244995b5a8c7aee29240ced957cf8d7fdb
Branch: master
src/plugins/kdb/db2/libdb2/test/dbtest.c | 84 +++++++++++++++++++++++++++---
src/plugins/kdb/db2/libdb2/test/run.test | 43 ++++++++++++++-
2 files changed, 118 insertions(+), 9 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Restore recursive dump functionality

Use the new recursive traversal interface to restore recursive dump
functionality.

https://github.com/krb5/krb5/commit/2029955eb70ba1a368031c4a6dbf1f554c529dd5
Author: Tom Yu <tlyu@mit.edu>
Commit: 2029955eb70ba1a368031c4a6dbf1f554c529dd5
Branch: master
doc/admin/admin_commands/kdb5_util.rst | 10 ++++++----
src/include/kdb.h | 1 +
src/kadmin/dbutil/dump.c | 6 +-----
src/plugins/kdb/db2/kdb_db2.c | 23 +++++++++++++++++++++--
4 files changed, 29 insertions(+), 11 deletions(-)
This fixes 6481. Some sites have experienced database corruption due to power failure and
crashes. Restoring recursive dump can help them with data recovery.

Depends on 8473 so that errors will propagate to the user. 8478 is helpful if building bttest
with -DDEBUG or -DSTATISTICS.