]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Enable ReadAsync testing and fault injection in db_stress (#11037)
authoranand76 <anand76@devvm4702.ftw0.facebook.com>
Thu, 15 Dec 2022 23:48:50 +0000 (15:48 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Dec 2022 23:48:50 +0000 (15:48 -0800)
commitc3f720c60db59c27486d8f18e094f9d1eb3c33cf
tree4fe6ea0379760445fc21b47b22e37b70f01ebbca
parentf02c708aa32829bbbd70aa3493af8444e76e4350
Enable ReadAsync testing and fault injection in db_stress (#11037)

Summary:
The db_stress code uses a wrapper Env on top of the raw/fault injection Env. The wrapper, DbStressEnvWrapper, is a legacy Env and thus has a default implementation of ReadAsync that just does a sync read. As a result, the ReadAsync implementations of PosixFileSystem and other file systems weren't being tested. Also, the ReadAsync interface wasn't implemented in FaultInjectionTestFS. This change implements the necessary interfaces in FaultInjectionTestFS and derives DbStressEnvWrapper from FileSystemWrapper rather than EnvWrapper.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11037

Test Plan: Run db_stress standalone and crash test. With this change, db_stress is able to repro the bug fixed in https://github.com/facebook/rocksdb/issues/10890.

Reviewed By: akankshamahajan15

Differential Revision: D42061290

Pulled By: anand1976

fbshipit-source-id: 7f0331fd15ee33fb4f7f0f4b22b206fe801ba074
db_stress_tool/db_stress_env_wrapper.h
db_stress_tool/db_stress_test_base.cc
db_stress_tool/db_stress_tool.cc
db_stress_tool/no_batched_ops_stress.cc
utilities/fault_injection_fs.cc
utilities/fault_injection_fs.h