-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finagle-core: Limit the maximum number of jobs in the thread pool bac…
…king the offload filter Problem The existence of an unbound queue anywhere can cause the application to run out of memory and terminate unexpectedly. Solution Allow the service owner to limit the length of the queue with some reasonable number. Differential Revision: https://phabricator.twitter.biz/D1116102
- Loading branch information
Showing
5 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
finagle-core/src/main/scala/com/twitter/finagle/offload/maxQueueLength.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.twitter.finagle.offload | ||
|
||
import com.twitter.app.GlobalFlag | ||
|
||
object maxQueueLength | ||
extends GlobalFlag[Int]( | ||
default = Int.MaxValue, | ||
help = | ||
"Experimental flag. Sets the maximum number of jobs in the thread pool in the offload filter" | ||
) |