You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/08/31 14:21:17 UTC

[GitHub] [ratis] szetszwo opened a new pull request, #732: RATIS-1692. Remove the use of the thirdparty Counter.

szetszwo opened a new pull request, #732:
URL: https://github.com/apache/ratis/pull/732

   See https://issues.apache.org/jira/browse/RATIS-1692


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] szetszwo commented on a diff in pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
szetszwo commented on code in PR #732:
URL: https://github.com/apache/ratis/pull/732#discussion_r962101211


##########
ratis-metrics/src/main/java/org/apache/ratis/metrics/RatisMetricRegistry.java:
##########
@@ -33,16 +32,14 @@
 public interface RatisMetricRegistry {
   Timer timer(String name);
 
-  Counter counter(String name);
+  LongCounter counter(String name);
 
   boolean remove(String name);
 
   <T> void gauge(String name, Supplier<Supplier<T>> gaugeSupplier);
 
   Timer timer(String name, MetricRegistry.MetricSupplier<Timer> supplier);
 
-  Counter counter(String name, MetricRegistry.MetricSupplier<Counter> supplier);

Review Comment:
   @codings-dan , thanks for reviewing this.
   
   - First of all, ratis-metrics is not yet a public API.  It is neither in the ratis-server-api module nor in the org.apache.ratis.protocol package.
   - The JIRA is to remove the use Counter.  There is no way to make it API compatible (e.g. Changing Counter to LongCounter is already API incompatible).  The user applications (e.g. Ozone) using it must update their code.
   
   We may consider NOT merging this to 2.4.0 for now.  Once we have finished all the sub tasks in  RATIS-1688, we may merge all the changes to branch-2 and require the user applications to update their code.



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] codings-dan commented on a diff in pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #732:
URL: https://github.com/apache/ratis/pull/732#discussion_r962132991


##########
ratis-metrics/src/main/java/org/apache/ratis/metrics/RatisMetricRegistry.java:
##########
@@ -33,16 +32,14 @@
 public interface RatisMetricRegistry {
   Timer timer(String name);
 
-  Counter counter(String name);
+  LongCounter counter(String name);
 
   boolean remove(String name);
 
   <T> void gauge(String name, Supplier<Supplier<T>> gaugeSupplier);
 
   Timer timer(String name, MetricRegistry.MetricSupplier<Timer> supplier);
 
-  Counter counter(String name, MetricRegistry.MetricSupplier<Counter> supplier);

Review Comment:
   > * There is no way to make it API compatible
   Got it. 
   
   > We may consider NOT merging this to 2.4.0 for now
   Sure, I also think 2.4.0 doesn't need to include RATIS-1688 related code.
   



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] codings-dan commented on a diff in pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #732:
URL: https://github.com/apache/ratis/pull/732#discussion_r962093680


##########
ratis-metrics/src/main/java/org/apache/ratis/metrics/RatisMetricRegistry.java:
##########
@@ -33,16 +32,14 @@
 public interface RatisMetricRegistry {
   Timer timer(String name);
 
-  Counter counter(String name);
+  LongCounter counter(String name);
 
   boolean remove(String name);
 
   <T> void gauge(String name, Supplier<Supplier<T>> gaugeSupplier);
 
   Timer timer(String name, MetricRegistry.MetricSupplier<Timer> supplier);
 
-  Counter counter(String name, MetricRegistry.MetricSupplier<Counter> supplier);

Review Comment:
   While I don't find any calls in ratis code, I'm not sure if removing it directly would introduce compatibility issues.



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] codings-dan merged pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
codings-dan merged PR #732:
URL: https://github.com/apache/ratis/pull/732


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] codings-dan commented on a diff in pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #732:
URL: https://github.com/apache/ratis/pull/732#discussion_r962132991


##########
ratis-metrics/src/main/java/org/apache/ratis/metrics/RatisMetricRegistry.java:
##########
@@ -33,16 +32,14 @@
 public interface RatisMetricRegistry {
   Timer timer(String name);
 
-  Counter counter(String name);
+  LongCounter counter(String name);
 
   boolean remove(String name);
 
   <T> void gauge(String name, Supplier<Supplier<T>> gaugeSupplier);
 
   Timer timer(String name, MetricRegistry.MetricSupplier<Timer> supplier);
 
-  Counter counter(String name, MetricRegistry.MetricSupplier<Counter> supplier);

Review Comment:
   > * There is no way to make it API compatible
   
   
   Got it. 
   
   > We may consider NOT merging this to 2.4.0 for now
   
   
   Sure, I also think 2.4.0 doesn't need to include RATIS-1688 related code.
   



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ratis] szetszwo commented on pull request #732: RATIS-1692. Remove the use of the thirdparty Counter.

Posted by GitBox <gi...@apache.org>.
szetszwo commented on PR #732:
URL: https://github.com/apache/ratis/pull/732#issuecomment-1236104782

   @codings-dan , thanks a lot for merging this!


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org