Skip to content

Commit 1d97ee0

Browse files
authored
Developer/hamids/v4.10.2 hotfix (#8699)
* Disable NoGCRegion on Linux consumption. (#8687) * Update to 4.10.3 * Update to IsLinuxConsumption check as IsAnyLinuxConsumption was added later on.
1 parent 24a8545 commit 1d97ee0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<LangVersion>latest</LangVersion>
66
<MajorVersion>4</MajorVersion>
77
<MinorVersion>10</MinorVersion>
8-
<PatchVersion>2</PatchVersion>
8+
<PatchVersion>3</PatchVersion>
99
<BuildNumber Condition="'$(BuildNumber)' == '' ">0</BuildNumber>
1010
<PreviewVersion></PreviewVersion>
1111

src/WebJobs.Script.WebHost/Middleware/ClrOptimizationMiddleware.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public ClrOptimizationMiddleware(RequestDelegate next, IScriptWebHostEnvironment
3131
_environment = environment;
3232
_logger = logger;
3333
_next = next;
34-
_invoke = InvokeClrOptimizationCheck;
34+
_invoke = _environment.IsLinuxConsumption() ? next : InvokeClrOptimizationCheck;
3535
}
3636

3737
public Task Invoke(HttpContext context)
@@ -56,7 +56,7 @@ private void StartStopGCAsBestEffort()
5656
try
5757
{
5858
// optimization not intended for single core VMs
59-
if (_webHostEnvironment.InStandbyMode && _environment.GetEffectiveCoresCount() > 1)
59+
if (_webHostEnvironment.InStandbyMode && _environment.GetEffectiveCoresCount() > 1 && !_environment.IsLinuxConsumption())
6060
{
6161
// If in placeholder mode and already in NoGCRegion, let's end it then start NoGCRegion again.
6262
// This may happen if there are multiple warmup calls(few minutes apart) during placeholder mode and before specialization.

0 commit comments

Comments
 (0)