[VOL-1512] Set device ownership
This commit consists of the following:
1) Set device ownership per Core in a Core-pair such that only 1
Core actively process a device (i.e. handles all the requests for
that device) while the other Core in the pair passively watch for
updates on that device and will take over in case the owner Core
failed to process the transaction.
2) Cleanup the lock mechanisms to ensure we use a read lock when
needed instead of just a lock.
3) Update logical port additions such that ports are added only when
the device is enabled.
4) Update the port Ids for the logical ports.
5) Update some sarama client configs for performance - this is an
ongoing tune up.
6) Update the adapter request handler in the Core to send back an
ACK immediately to the adapter request instead of processing the
request fully and then sending an ACK. This reduces the latency
over kafka and therefore reduces the likelihood of timeouts.
Change-Id: I9149bf3ba6fbad38e3a29c76ea8dba2f9f731d29
diff --git a/kafka/client.go b/kafka/client.go
index 316a4a5..9588274 100644
--- a/kafka/client.go
+++ b/kafka/client.go
@@ -40,9 +40,9 @@
DefaultKafkaPort = 9092
DefaultGroupName = "voltha"
DefaultSleepOnError = 1
- DefaultProducerFlushFrequency = 5
+ DefaultProducerFlushFrequency = 1
DefaultProducerFlushMessages = 1
- DefaultProducerFlushMaxmessages = 5
+ DefaultProducerFlushMaxmessages = 1
DefaultProducerReturnSuccess = true
DefaultProducerReturnErrors = true
DefaultProducerRetryMax = 3