You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by keith-turner <gi...@git.apache.org> on 2017/05/11 21:12:55 UTC

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

GitHub user keith-turner opened a pull request:

    https://github.com/apache/incubator-fluo/pull/837

    fixes #835 escaped binary data in collision logging

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/keith-turner/fluo fluo-835

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-fluo/pull/837.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #837
    
----
commit e37c22bb8ef708815c83398287331a42bd737c22
Author: Keith Turner <kt...@apache.org>
Date:   2017-05-11T21:01:27Z

    fixes #835 escaped binary data in collision logging

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

Posted by ctubbsii <gi...@git.apache.org>.
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/837#discussion_r116110058
  
    --- Diff: modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
    @@ -96,6 +96,11 @@ private String encC(Map<Column, Bytes> ret) {
             + "=" + enc(e.getValue())));
       }
     
    +  private String encMBC(Map<Bytes, Set<Column>> m) {
    --- End diff --
    
    New private method with obfuscated name should have some comment describing what it's supposed to do.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

Posted by ctubbsii <gi...@git.apache.org>.
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/837#discussion_r116111357
  
    --- Diff: modules/integration/src/test/java/org/apache/fluo/integration/TestUtil.java ---
    @@ -17,18 +17,26 @@
     
     import org.apache.fluo.api.client.SnapshotBase;
     import org.apache.fluo.api.client.TransactionBase;
    +import org.apache.fluo.api.data.Bytes;
     import org.apache.fluo.api.data.Column;
     
     public class TestUtil {
     
       private TestUtil() {}
     
    +  private static final Bytes ZERO = Bytes.of("0");
    +
    +  public static void increment(TransactionBase tx, Bytes row, Column col, int val) {
    +    int prev = 0;
    +    String prevStr = tx.get(row, col, ZERO).toString();
    --- End diff --
    
    Is it safe to call toString here on arbitrary bytes?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/837#discussion_r116251341
  
    --- Diff: modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
    @@ -96,6 +96,11 @@ private String encC(Map<Column, Bytes> ret) {
             + "=" + enc(e.getValue())));
       }
     
    +  private String encMBC(Map<Bytes, Set<Column>> m) {
    --- End diff --
    
    A better method name would help also.  Maybe `toEscapedString(...)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/837#discussion_r116265085
  
    --- Diff: modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
    @@ -96,6 +96,11 @@ private String encC(Map<Column, Bytes> ret) {
             + "=" + enc(e.getValue())));
       }
     
    +  private String encMBC(Map<Bytes, Set<Column>> m) {
    --- End diff --
    
    I changed the method names.  I didn't think comments were needed since the methods are private, have descriptive name, and are single line implementations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/837#discussion_r116249464
  
    --- Diff: modules/integration/src/test/java/org/apache/fluo/integration/TestUtil.java ---
    @@ -17,18 +17,26 @@
     
     import org.apache.fluo.api.client.SnapshotBase;
     import org.apache.fluo.api.client.TransactionBase;
    +import org.apache.fluo.api.data.Bytes;
     import org.apache.fluo.api.data.Column;
     
     public class TestUtil {
     
       private TestUtil() {}
     
    +  private static final Bytes ZERO = Bytes.of("0");
    +
    +  public static void increment(TransactionBase tx, Bytes row, Column col, int val) {
    +    int prev = 0;
    +    String prevStr = tx.get(row, col, ZERO).toString();
    --- End diff --
    
    I think its safe since its internal test code and we have full control over all of the code that calls it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---