]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: drop the old FuturizedStore::Exception class.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 26 Aug 2019 10:38:21 +0000 (12:38 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 20 Nov 2019 19:33:56 +0000 (20:33 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/os/futurized_store.h

index afb448b050666e372e66f3d932ebe3ed85815236..b7045a7b00ecbe1f74e287be6f4bc5d5b0c033e2 100644 (file)
@@ -26,36 +26,6 @@ class FuturizedCollection;
 class FuturizedStore {
 
 public:
-  // TODO: replace with the crimson::errorator concept
-  template <class ConcreteExceptionT>
-  class Exception : public std::logic_error {
-  public:
-    using std::logic_error::logic_error;
-
-    // Throwing an exception isn't the sole way to signalize an error
-    // with it. This approach nicely fits cold, infrequent issues but
-    // when applied to a hot one (like ENOENT on write path), it will
-    // likely hurt performance.
-    // Alternative approach for hot errors is to create exception_ptr
-    // on our own and place it in the future via make_exception_future.
-    // When ::handle_exception is called, handler would inspect stored
-    // exception whether it's hot-or-cold before rethrowing it.
-    // The main advantage is both types flow through very similar path
-    // based on future::handle_exception.
-    static bool is_class_of(const std::exception_ptr& ep) {
-      // Seastar offers hacks for making throwing lock-less but stack
-      // unwinding still can be a problem so painful to justify going
-      // with non-standard, obscure things like this one.
-      return *ep.__cxa_exception_type() == typeid(ConcreteExceptionT);
-    }
-  };
-
-  struct EnoentException : public Exception<EnoentException> {
-    using Exception<EnoentException>::Exception;
-  };
-  struct EnodataException : public Exception<EnodataException> {
-    using Exception<EnodataException>::Exception;
-  };
   static std::unique_ptr<FuturizedStore> create(const std::string& type,
                                                 const std::string& data);
   FuturizedStore() = default;