rocksdb/utilities/transactions
Peter Dillinger 05a1d52e77 Use FaultInjectionTestFS in transaction_test, clarify Close() APIs (#11499)
Summary:
... instead of race-condition-laden FaultInjectionTestEnv. See https://app.circleci.com/pipelines/github/facebook/rocksdb/27912/workflows/4c63e5a8-597e-439d-8c7e-82308056af02/jobs/609648 and similar PR https://github.com/facebook/rocksdb/issues/11271

Had to fix the semantics of FaultInjectionTestFS Close() operations to allow a non-OK Close() to fulfill the obligation to close before destruction. To me, this is the obvious choice of Close contract, because what is the caller supposed to do if Close() fails and they still have an obligation to successfully close before object destruction? Call Close() in an infinite loop? Leak the object? I have added API comments to the Env and Filesystem Close() functions to clarify the contracts.

Note that `DB::Close()` has one exception to this kind of Close contract, but it is clearly described in API comments and it is really only for catching programming mistakes, not for dealing with exogenous errors.

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

Test Plan: watch CI

Reviewed By: jowlyzhang

Differential Revision: D46375708

Pulled By: pdillinger

fbshipit-source-id: 03d4d8251e5df50a82ecd139f7e83f613015fe40
2023-06-21 23:38:54 -07:00
..
lock Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
optimistic_transaction.cc Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
optimistic_transaction.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
optimistic_transaction_db_impl.cc Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
optimistic_transaction_db_impl.h Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
optimistic_transaction_test.cc Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
pessimistic_transaction.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
pessimistic_transaction.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
pessimistic_transaction_db.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
pessimistic_transaction_db.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
snapshot_checker.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
timestamped_snapshot_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_base.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
transaction_base.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_db_mutex_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_db_mutex_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_test.cc Use FaultInjectionTestFS in transaction_test, clarify Close() APIs (#11499) 2023-06-21 23:38:54 -07:00
transaction_test.h Use FaultInjectionTestFS in transaction_test, clarify Close() APIs (#11499) 2023-06-21 23:38:54 -07:00
transaction_util.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_util.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_committed_transaction_ts_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_prepared_transaction_test.cc Remove wait_unscheduled from waitForCompact internal API (#11443) 2023-05-17 18:13:50 -07:00
write_prepared_txn.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
write_prepared_txn.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_prepared_txn_db.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
write_prepared_txn_db.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_unprepared_transaction_test.cc Refactor WriteUnpreparedStressTest to be a unit test (#11424) 2023-05-22 12:31:52 -07:00
write_unprepared_txn.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
write_unprepared_txn.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_unprepared_txn_db.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
write_unprepared_txn_db.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00