Skip to content

cloud example coredump when specify options max_log_file_size #281

@wangshao1

Description

@wangshao1

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

Expected behavior

Actual behavior

when specify options.max_log_file_size to a none zero value, process coredumps because of a fail assert about cloud_manifest.
Here is the stack
截屏2023-08-23 21 38 26
When rocksdb open and options.info_log is nullptr, rocksdb will create a autorolllogger,autorolllogger's construct function will find exist old LOG files by calling env->filesystem()->GetChildren(). In rocksdb-cloud, env->filesystem is cloudFileSystem which will do RemapFilename for some files, but cloud_manifest has not been loaded yet.
In my opinion, the LOGs will not been uploaded to cloud and not need to be synchonized either. So maybe we can pass filesystem::Default() when constructing autorolllogger? Or add extra member varable in env to represent base_fs_?

Steps to reproduce the behavior

specify options.max_log_file_size or options.log_file_time_to_roll to a none zero value.
run example in cloud sub dir twice(To make the local_dir is not empty).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions