Move throwOnIllegalState call to drain queue method to prevent improper error logging during worker shutdown
This commit is contained in:
parent
a5d1c67660
commit
62061a2d2d
1 changed files with 1 additions and 1 deletions
|
|
@ -289,7 +289,6 @@ public class PrefetchRecordsPublisher implements RecordsPublisher {
|
||||||
}
|
}
|
||||||
|
|
||||||
private PrefetchRecordsRetrieved peekNextResult() {
|
private PrefetchRecordsRetrieved peekNextResult() {
|
||||||
throwOnIllegalState();
|
|
||||||
return publisherSession.peekNextRecord();
|
return publisherSession.peekNextRecord();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -389,6 +388,7 @@ public class PrefetchRecordsPublisher implements RecordsPublisher {
|
||||||
// If there is an event available to drain and if there is at least one demand,
|
// If there is an event available to drain and if there is at least one demand,
|
||||||
// then schedule it for delivery
|
// then schedule it for delivery
|
||||||
if (publisherSession.hasDemandToPublish() && canDispatchRecord(recordsToDeliver)) {
|
if (publisherSession.hasDemandToPublish() && canDispatchRecord(recordsToDeliver)) {
|
||||||
|
throwOnIllegalState();
|
||||||
subscriber.onNext(recordsToDeliver.prepareForPublish());
|
subscriber.onNext(recordsToDeliver.prepareForPublish());
|
||||||
recordsToDeliver.dispatched();
|
recordsToDeliver.dispatched();
|
||||||
lastEventDeliveryTime = Instant.now();
|
lastEventDeliveryTime = Instant.now();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue