You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sanpwc (via GitHub)" <gi...@apache.org> on 2023/12/14 17:23:47 UTC
[PR] IGNITE-21062 [ignite-3]
sanpwc opened a new pull request, #2958:
URL: https://github.com/apache/ignite-3/pull/2958
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- There is a single JIRA ticket related to the pull request.
\- The web-link to the pull request is attached to the JIRA ticket.
\- The JIRA ticket has the Patch Available state.
\- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
\- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427914378
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
Sorry, after re-reading your last message, I say "yes", I assumed the same implementation that you provided
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427891771
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
Do you assume following (or similar) implementation in MessageImpl classes?
```
@Override
public Object clone() {
try {
return super.clone();
}
catch (CloneNotSupportedException e) {
// Never expected to be thrown because whole message class hierarchy implements clone();
throw new AssertionError(e);
}
}
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 Fix safe time reordering in partitions. [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc merged PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427908892
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
If Object clone() in NetworkMessage (or NetworkMessage clone() which currently doesn't matter) doesn't through an exception implementation (*Impl) also should not declare throws CloneNotSupportedException. And because every MessageImple class directly extends Object supler.clone() will through CloneNotSupportedException and thus should be handled. Am I missing something?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427891771
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
Do you assume following (or similar) implementation in MessageImpl classes?
```
@Override
public MessageImpl clone() {
try {
return (MessageImpl) super.clone();
}
catch (CloneNotSupportedException e) {
// Never expected to be thrown because whole message class hierarchy implements clone();
throw new AssertionError(e);
}
}
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427810419
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
I think we could add "clone" to the "NetworkMessage" instead, avoiding handling the impossible exception as a result
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-21062 [ignite-3]
Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #2958:
URL: https://github.com/apache/ignite-3/pull/2958#discussion_r1427904111
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/command/SafeTimePropagatingCommand.java:
##########
@@ -46,4 +46,11 @@ default void safeTimeLong(long safeTime) {
default HybridTimestamp safeTime() {
return hybridTimestamp(safeTimeLong());
}
+
+ /**
+ * Public clone version that is implemented in generated *Impl class.
+ */
+ default Object clone() throws CloneNotSupportedException {
Review Comment:
Almost. I thought its enough to declare `Object clone();` in `NetworkMessage`, without exception. MEssage generator always creates implementation, that's fine. I'm only worried about the exception in the signature, that will never happen in reality
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org