rabbah commented on a change in pull request #3104: Add TID stride configuration
URL: 
https://github.com/apache/incubator-openwhisk/pull/3104#discussion_r161150761
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/common/TransactionId.scala
 ##########
 @@ -241,12 +245,15 @@ object TransactionId {
  * A thread-safe transaction counter.
  */
 trait TransactionCounter {
-  val numberOfInstances: Int
+  case class TransactionCounterConfig(strides: Int)
+
+  val transCounterConfig = 
loadConfigOrThrow[TransactionCounterConfig](ConfigKeys.transactions)
+  val strides = transCounterConfig.strides
   val instanceOrdinal: Int
 
-  private lazy val cnt = new AtomicInteger(numberOfInstances + instanceOrdinal)
+  private lazy val cnt = new AtomicInteger(strides + instanceOrdinal)
 
 Review comment:
   Seems that having the instance ordinal and stride is duplicitous. Can we 
reduce to just strides

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to