Skip to content

Commit

Permalink
Remove response stream disconnected status gate
Browse files Browse the repository at this point in the history
  • Loading branch information
joshthoward committed Sep 1, 2024
1 parent 50fa4e7 commit e52e5cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
15 changes: 5 additions & 10 deletions src/workerd/io/worker-entrypoint.c++
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <workerd/jsg/jsg.h>
#include <workerd/api/global-scope.h>
#include <workerd/api/util.h>
#include <workerd/util/autogate.h>
#include <workerd/util/sentry.h>
#include <workerd/util/thread-scopes.h>
#include <workerd/util/use-perfetto-categories.h>
Expand Down Expand Up @@ -314,15 +313,11 @@ kj::Promise<void> WorkerEntrypoint::request(kj::HttpMethod method,
// Now that the IoContext is dropped (unless it had waitUntil()s), we can finish proxying
// without pinning it or the isolate into memory.
KJ_IF_SOME(p, proxyTask) {
if (util::Autogate::isEnabled(util::AutogateKey::RESPONSE_STREAM_DISCONNECTED_STATUS)) {
return p.catch_(
[metrics = kj::mv(metrics)](kj::Exception&& e) mutable -> kj::Promise<void> {
metrics->reportFailure(e, RequestObserver::FailureSource::DEFERRED_PROXY);
return kj::mv(e);
});
} else {
return kj::mv(p);
}
return p.catch_(
[metrics = kj::mv(metrics)](kj::Exception&& e) mutable -> kj::Promise<void> {
metrics->reportFailure(e, RequestObserver::FailureSource::DEFERRED_PROXY);
return kj::mv(e);
});
} else {
return kj::READY_NOW;
}
Expand Down
2 changes: 0 additions & 2 deletions src/workerd/util/autogate.c++
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ kj::StringPtr KJ_STRINGIFY(AutogateKey key) {
return "test-workerd"_kj;
case AutogateKey::PYODIDE_LOAD_EXTERNAL:
return "pyodide-load-external"_kj;
case AutogateKey::RESPONSE_STREAM_DISCONNECTED_STATUS:
return "response-stream-disconnected-status"_kj;
case AutogateKey::NumOfKeys:
KJ_FAIL_ASSERT("NumOfKeys should not be used in getName");
}
Expand Down
2 changes: 0 additions & 2 deletions src/workerd/util/autogate.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ namespace workerd::util {
enum class AutogateKey {
TEST_WORKERD,
PYODIDE_LOAD_EXTERNAL,
// Enables reporting of disconnection during deferred proxying as a new status.
RESPONSE_STREAM_DISCONNECTED_STATUS,
NumOfKeys // Reserved for iteration.
};

Expand Down

0 comments on commit e52e5cb

Please sign in to comment.