BUG-8665: fix memory leak around RangeSets 00/58800/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2017 10:13:58 +0000 (12:13 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2017 10:19:56 +0000 (12:19 +0200)
commit8ed5603b4f3503559f2f85137c42d7605ebfd3e9
tree1ddc38f8d700ea6e4538aad0316e6e8d516d3ef9
parent92308eaeb2a32ce90bee14890d1e381d7189ad8b
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