From afb78ef60c418a283df4a12f09282e2aca560c56 Mon Sep 17 00:00:00 2001 From: Artem Labazin Date: Wed, 25 Sep 2019 16:30:31 +0300 Subject: [PATCH] fix infinity loop during reading from backup --- CHANGELOG.md | 6 ++++++ benchmarks/pom.xml | 2 +- pom.xml | 4 ++-- popout/pom.xml | 2 +- .../java/org/infobip/lib/popout/synced/SyncedFileQueue.java | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48b3a81..d189fce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Add batch write/read (using FileChannel) with customizable batch size; - Add concurrent access to queue (methods with `synchronized` keyword or based on locks). +## [2.1.1](https://github.com/infobip/popout/releases/tag/2.1.1) - 2019-09-25 + +### Fixed + +- `SyncedFileQueue` don't fall in infinity loop during restoring from backup. + ## [2.1.0](https://github.com/infobip/popout/releases/tag/2.1.0) - 2019-04-28 ### Added diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 2ddac99..cb16ed0 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.infobip.lib parent - 2.1.0 + 2.1.1 benchmarks diff --git a/pom.xml b/pom.xml index 292f65e..273e454 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ limitations under the License. org.infobip.lib parent - 2.1.0 + 2.1.1 pom @@ -71,7 +71,7 @@ limitations under the License. https://github.com/infobip/popout scm:git:https://github.com/infobip/popout.git scm:git:https://github.com/infobip/popout.git - 2.1.0 + 2.1.1 diff --git a/popout/pom.xml b/popout/pom.xml index b57739d..fe5d02c 100644 --- a/popout/pom.xml +++ b/popout/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.infobip.lib parent - 2.1.0 + 2.1.1 popout diff --git a/popout/src/main/java/org/infobip/lib/popout/synced/SyncedFileQueue.java b/popout/src/main/java/org/infobip/lib/popout/synced/SyncedFileQueue.java index a74c919..1dc5278 100644 --- a/popout/src/main/java/org/infobip/lib/popout/synced/SyncedFileQueue.java +++ b/popout/src/main/java/org/infobip/lib/popout/synced/SyncedFileQueue.java @@ -67,6 +67,7 @@ class SyncedFileQueue extends FileQueue { size = new LongAdder(); val iterator = backend.iterator(); while (iterator.hasNext()) { + iterator.next(); size.increment(); } }