Skip to content

Commit

Permalink
Merge pull request #2638 from cloudflare/joshthoward/ungate-response-…
Browse files Browse the repository at this point in the history
…stream-disconnected-status

Remove response stream disconnected status gate
  • Loading branch information
joshthoward authored Sep 29, 2024
2 parents 974796c + f67203a commit 6fa86ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
13 changes: 4 additions & 9 deletions src/workerd/io/worker-entrypoint.c++
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,10 @@ 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 @@ -19,8 +19,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 @@ -15,8 +15,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 6fa86ee

Please sign in to comment.