BUG-8665: fix memory leak around RangeSets 03/58803/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2017 10:13:58 +0000 (12:13 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 13 Jun 2017 16:29:19 +0000 (16:29 +0000)
commitf984aadefd56f48aec345b8b7cc7ddf27b794f56
tree2b955ff912e3646153ef91c62e3cfcc91cca6dee
parent08269ac33356663d75f0df8cc54936eac5553e7b
BUG-8665: fix memory leak around RangeSets

This is a thinko on my part, where I was thinking in terms of a
discrete set (UnsignedLong) and assumed RangeSets will coalesce
individual items.

Unfortunately TreeRangeSet has no way of knowing that that the
domain it operates on is discrete and hence will not merge invididual
ranges.

This patch fixes the problem by using [N,N+1) ranges to address
the problem. A follow-up patch should address this in a more
efficient manner.

Change-Id: Iecc313e09ae0cdd51a42f7d39281f7634f0358a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractFrontendHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendClientMetadataBuilder.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendHistoryMetadataBuilder.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LeaderFrontendState.java