BUG-9054: do not use BatchedModifications needlessly 53/62453/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 30 Aug 2017 14:28:28 +0000 (16:28 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 1 Sep 2017 06:07:43 +0000 (06:07 +0000)
commit71a4b6377ba598b18c64b89b6b16538751d2d116
treedaa8007085b61e721e4d2bbaaa098624f0bc9f39
parent892d03c37048c9bcc61c2643c8ebf3531f08f285
BUG-9054: do not use BatchedModifications needlessly

Transaction identifier, which is a required parameter for
BatchedModifications is a resource tracked on the backend and is
assumed to be allocated contiguously. Using BatchedModifications
to transport only a list of modifications means we are allocating
transactions IDs which we then never use.

This patch reworks the logic so it tracks modifications in a list
and allocates BatchedModifications only when we are ready to actually
commit something.

Change-Id: I3f71511cfd68e96e80790e69d28d083f195e5e12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShardCommitCoordinator.java