Skip to content

Commit

Permalink
participant-integration-api: Remove limitMaxCommandsInFlight. (#10626)
Browse files Browse the repository at this point in the history
This is always set to `true`, so let's just hard-code it.

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
SamirTalwar authored Aug 20, 2021
1 parent b4af6d1 commit c0fbad1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ private[daml] object ApiServices {
ledgerId,
commandConfig.inputBufferSize,
commandConfig.maxCommandsInFlight,
commandConfig.limitMaxCommandsInFlight,
commandConfig.retentionPeriod,
),
// Using local services skips the gRPC layer, improving performance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,11 @@ private[apiserver] final class ApiCommandService private (
ledgerEnd,
() => ledgerConfig.maxDeduplicationTime,
)
val trackingFlow =
if (configuration.limitMaxCommandsInFlight)
MaxInFlight(
configuration.maxCommandsInFlight,
capacityCounter = metrics.daml.commands.maxInFlightCapacity(metricsPrefixFirstParty),
lengthCounter = metrics.daml.commands.maxInFlightLength(metricsPrefixFirstParty),
).joinMat(tracker)(Keep.right)
else
tracker
val trackingFlow = MaxInFlight(
configuration.maxCommandsInFlight,
capacityCounter = metrics.daml.commands.maxInFlightCapacity(metricsPrefixFirstParty),
lengthCounter = metrics.daml.commands.maxInFlightLength(metricsPrefixFirstParty),
).joinMat(tracker)(Keep.right)
TrackerImpl(
trackingFlow,
configuration.inputBufferSize,
Expand Down Expand Up @@ -247,7 +243,6 @@ private[apiserver] object ApiCommandService {
ledgerId: LedgerId,
inputBufferSize: Int,
maxCommandsInFlight: Int,
limitMaxCommandsInFlight: Boolean,
retentionPeriod: FiniteDuration,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import scala.concurrent.duration.{DurationInt, FiniteDuration}
* transaction has been shipped via the WriteService.
* @param maxCommandsInFlight
* Maximum number of submitted commands waiting to be completed for each party.
* @param limitMaxCommandsInFlight
* Whether [[maxCommandsInFlight]] should be honored or not.
* @param retentionPeriod
* For how long the command service will keep an active command tracker for a given party.
* A longer retention period allows to not instantiate a new tracker for a party that seldom acts.
Expand All @@ -30,7 +28,6 @@ final case class CommandConfiguration(
inputBufferSize: Int,
maxParallelSubmissions: Int,
maxCommandsInFlight: Int,
limitMaxCommandsInFlight: Boolean,
retentionPeriod: FiniteDuration,
)

Expand All @@ -42,7 +39,6 @@ object CommandConfiguration {
inputBufferSize = 512,
maxParallelSubmissions = 512,
maxCommandsInFlight = 256,
limitMaxCommandsInFlight = true,
retentionPeriod = DefaultTrackerRetentionPeriod,
)
}

0 comments on commit c0fbad1

Please sign in to comment.