franz1981 edited a comment on pull request #3392: URL: https://github.com/apache/activemq-artemis/pull/3392#issuecomment-781920540
@michaelandrepearce This part of my same answer at the end of the comment explain the latter point: > I see that ChannelImpl.CHANNEL_ID.REPLICATION Artemis Channel is always created with a confWindowSize == -1 so it seems it won't have any blocking behaviour caused by the resendCache or responseAsyncCache and given that it cannot failover nor is using sendBlocking, its ChannelImpl::lock isn't used, but is still brittle and I would like to enforce it. So, in short, it shouldn't block, but I would like to enforce it somehow to save in the future that it could ever happen... While re the former point > what happen to the Netty channel writability with racing sends on a different artemis Channel (eg PING)? It means we can get: - premature stop while batching (by the PING packet size, so we won't loose that much really) - `sendReplicatedPackets(true)` ie resume, believing to be writable again without being able to send nothing, that will end by resetting the `notWritableFrom` counter - VERY unlikely to happen, given that PINGs are pretty small and there is plenty of room between low watermark and high watermarks of Netty writability - Both cases won't harm correctness, but introduce just un-necessary checks... The ideal thing would be to send the `PING` from inside the event loop using the scheduled executor API exposed by it: it would save sending pings or whatever heartbeat mechanism if we're already sending replicated packets, because unnecessary really... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
