[
https://issues.apache.org/jira/browse/IGNITE-23906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Polovtsev updated IGNITE-23906:
-----------------------------------------
Description:
I've noticed a couple of minor things in the WatchProcessor class:
1. {{updateCompactionRevision}} and {{updateOnlyRevision}} always tigger the
failure handler, because they are missing the `e != null` check.
2. This part:
{code:java}
.filter(entry ->
entry.key().length <= IDEMPOTENT_COMMAND_PREFIX_BYTES.length
||
entry.key().length >
IDEMPOTENT_COMMAND_PREFIX_BYTES.length
&& !ByteBuffer.wrap(entry.key(), 0,
IDEMPOTENT_COMMAND_PREFIX_BYTES.length)
.equals(ByteBuffer.wrap(IDEMPOTENT_COMMAND_PREFIX_BYTES)))
{code}
is unreadable and can be written more efficiently.
was:
I've noticed a couple of minor things in the WatchProcessor class:
1. {{updateCompactionRevision}} and {{updateOnlyRevision}} always tigger the
failure handler, because they are missing the `e != null` check.
2. This part:
{code:java}
.filter(entry ->
entry.key().length <=
IDEMPOTENT_COMMAND_PREFIX_BYTES.length
||
entry.key().length >
IDEMPOTENT_COMMAND_PREFIX_BYTES.length
&&
!ByteBuffer.wrap(entry.key(), 0, IDEMPOTENT_COMMAND_PREFIX_BYTES.length)
.equals(ByteBuffer.wrap(IDEMPOTENT_COMMAND_PREFIX_BYTES)))
{code}
is unreadable and can be written more efficiently.
> Minor fixes in WatchProcessor
> -----------------------------
>
> Key: IGNITE-23906
> URL: https://issues.apache.org/jira/browse/IGNITE-23906
> Project: Ignite
> Issue Type: Improvement
> Reporter: Aleksandr Polovtsev
> Assignee: Aleksandr Polovtsev
> Priority: Trivial
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I've noticed a couple of minor things in the WatchProcessor class:
> 1. {{updateCompactionRevision}} and {{updateOnlyRevision}} always tigger the
> failure handler, because they are missing the `e != null` check.
> 2. This part:
> {code:java}
> .filter(entry ->
> entry.key().length <= IDEMPOTENT_COMMAND_PREFIX_BYTES.length
> ||
> entry.key().length >
> IDEMPOTENT_COMMAND_PREFIX_BYTES.length
> && !ByteBuffer.wrap(entry.key(), 0,
> IDEMPOTENT_COMMAND_PREFIX_BYTES.length)
>
> .equals(ByteBuffer.wrap(IDEMPOTENT_COMMAND_PREFIX_BYTES)))
> {code}
> is unreadable and can be written more efficiently.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)