Project

General

Profile

Actions

Bug #20855

closed

wal_dir mismatch bewteen rocksdb's impl and bluestore's env

Added by Chang Liu over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

That we call rocksdb::RepairDB on bluestore's db will get a core dump. the reason is that we put wal&minifest on BDEV_WAL and db_paths contains only BDEV_DB & BDEV_SLOW, but rocksdb::RepairDB assert that wal&manifest always on the first directory of db_paths.

additionally, rocksdb has a option called wal_dir. we do not use wal_dir in our implementation. it seems that rocksdb::RepairDB also has a bug that it doesn't know wal&manifest could be under wal_dir.

Actions #1

Updated by Chang Liu over 6 years ago

(gdb) l 250, 270
250           Status status =
251               env_->GetChildren(db_options_.db_paths[path_id].path, &filenames);
252           if (!status.ok()) {
253             return status;
254           }
255           if (!filenames.empty()) {
256             found_file = true;
257           }
258
259           uint64_t number;
260           FileType type;
261           for (size_t i = 0; i < filenames.size(); i++) {
262             if (ParseFileName(filenames[i], &number, &type)) {
263               if (type == kDescriptorFile) {
264                 assert(path_id == 0);
265                 manifests_.push_back(filenames[i]);
266               } else {
267                 if (number + 1 > next_file_number_) {
268                   next_file_number_ = number + 1;
269                 }
270                 if (type == kLogFile) {
(gdb) p db_options_.db_paths
$2 = std::vector of length 3, capacity 3 = {{path = "db.wal", target_size = 996147200}, {path = "db", target_size = 63753420}, {path = "db.slow", target_size = 10200547328}}
(gdb) p filenames
$3 = std::vector of length 18, capacity 30 = {"000030.log", ".", "..", "000004.sst", "000013.sst", "000019.sst", "CURRENT", "IDENTITY", "LOCK", "MANIFEST-000029", "OPTIONS-000017", "OPTIONS-000020", 
  "OPTIONS-000022.dbtmp", "OPTIONS-000025.dbtmp", "OPTIONS-000028.dbtmp", "OPTIONS-000031.dbtmp", ".", ".."}
(gdb) p path_id
$4 = 1
(gdb) p filenames[i]
$5 = "000030.log" 

Actions #2

Updated by Chang Liu over 6 years ago

Chang Liu wrote:

[...]

we want rocksdb to put WAL files on BDEV_WAL(directory called db.wal). but it seems that rocksdb saves 000030.log on BDEV_DB(directory called db).

Actions #3

Updated by Chang Liu over 6 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF