From 3d87d5bcf37b7db74ed32c4734a17e47ed51ceb9 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Mon, 11 Nov 2024 16:34:03 +0800 Subject: [PATCH] cleanup --- versiondb/tsrocksdb/opts.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/versiondb/tsrocksdb/opts.go b/versiondb/tsrocksdb/opts.go index fb6eca3c24..604c203b72 100644 --- a/versiondb/tsrocksdb/opts.go +++ b/versiondb/tsrocksdb/opts.go @@ -64,19 +64,6 @@ func OpenVersionDB(dir string) (*grocksdb.DB, *grocksdb.ColumnFamilyHandle, erro return db, cfHandles[1], nil } -// OpenVersionDBForReadOnly opens versiondb for read-only. -func OpenVersionDBForReadOnly(dir string, errorIfWalFileExists bool) (*grocksdb.DB, *grocksdb.ColumnFamilyHandle, error) { - opts := grocksdb.NewDefaultOptions() - db, cfHandles, err := grocksdb.OpenDbForReadOnlyColumnFamilies( - opts, dir, []string{"default", VersionDBCFName}, - []*grocksdb.Options{opts, NewVersionDBOpts(false)}, errorIfWalFileExists, - ) - if err != nil { - return nil, nil, err - } - return db, cfHandles[1], nil -} - // OpenVersionDBAndTrimHistory opens versiondb similar to `OpenVersionDB`, // but it also trim the versions newer than target one, can be used for rollback. func OpenVersionDBAndTrimHistory(dir string, version int64) (*grocksdb.DB, *grocksdb.ColumnFamilyHandle, error) {