Skip to content

Commit 5158550

Browse files
authored
Fix to bug of uninitialized flush_items (couchbase#10)
1 parent 7538851 commit 5158550

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wal.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,17 +1664,17 @@ static fdb_status _wal_flush(struct filemgr *file,
16641664
size_t num_shards = file->wal->num_shards;
16651665
bool do_sort = !filemgr_is_fully_resident(file);
16661666

1667-
if (_wal_check_bottom_up_build(dbhandle)) {
1668-
// If bottom-up build, nothing needs to be done here.
1669-
return FDB_RESULT_SUCCESS;
1670-
}
1671-
16721667
if (do_sort) {
16731668
avl_init(tree, WAL_SORTED_FLUSH);
16741669
} else {
16751670
list_init(list_head);
16761671
}
16771672

1673+
if (_wal_check_bottom_up_build(dbhandle)) {
1674+
// If bottom-up build, nothing needs to be done here.
1675+
return FDB_RESULT_SUCCESS;
1676+
}
1677+
16781678
memset(&root_info, 0xff, sizeof(root_info));
16791679
_wal_backup_root_info(dbhandle, &root_info);
16801680

0 commit comments

Comments
 (0)