You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by galen-pivotal <gi...@git.apache.org> on 2017/07/20 21:56:23 UTC

[GitHub] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

GitHub user galen-pivotal opened a pull request:

    https://github.com/apache/geode/pull/649

    GEODE-2997: Change new protocol GetAllResponse.

    @kohlmu-pivotal @hiteshk25 @WireBaron @pivotal-amurmann @bschuchardt 
    
    I think it's better to return the errors and the successful keys so that
    one failed lookup doesn't mess up the whole request.
    
    Imagining this as a conversational PR to see what the response is.
    
    Signed-off-by: Galen O'Sullivan <go...@pivotal.io>
    
    Thank you for submitting a contribution to Apache Geode.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
    
    - [X] Is your initial contribution a single, squashed commit?
    
    - [NO.] Does `gradlew build` run cleanly?
    
    - [ ] Have you written or updated unit tests to verify your changes?
    
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and
    submit an update to your PR as soon as possible. If you need help, please send an
    email to dev@geode.apache.org.


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

    $ git pull https://github.com/galen-pivotal/geode changeGetAllAPI

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

    https://github.com/apache/geode/pull/649.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 #649
    
----
commit 2b07dfc3cae729b8e23655fa11f3e8d485c520c4
Author: Alexander Murmann <am...@pivotal.io>
Date:   2017-07-20T21:44:16Z

    GEODE-2997: Change new protocol GetAllResponse.
    
    I think it's better to return the errors and the successful keys so that
    one failed lookup doesn't mess up the whole request.
    
    Imagining this as a conversational PR to see what the response is.
    
    Signed-off-by: Galen O'Sullivan <go...@pivotal.io>

----


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal closed the pull request at:

    https://github.com/apache/geode/pull/649


---
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] geode issue #649: GEODE-2997: Change new protocol GetAllResponse.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal commented on the issue:

    https://github.com/apache/geode/pull/649
  
     Some other thoughts from today:
    * make GetAllResponse return a collection of Entries and a collection of errors.
    * make Get and GetAll return the same type of response, as mentioned above. Get will always return a single key in either the success or error collections.
       - maybe looking in a collection is extra overhead for a simple Get request?
       - bigger errors (like malformed messages) will still return errors at the Response level rather than errors nested in the response message.
    
    Thoughts?


---
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] geode issue #649: GEODE-2997: Change new protocol GetAllResponse.

Posted by kohlmu-pivotal <gi...@git.apache.org>.
Github user kohlmu-pivotal commented on the issue:

    https://github.com/apache/geode/pull/649
  
    @galen-pivotal is this PR active anymore?


---
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] geode issue #649: GEODE-2997: Change new protocol GetAllResponse.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal commented on the issue:

    https://github.com/apache/geode/pull/649
  
    This isn't code complete; I'm planning to work on this when I have the time (unless anyone else wants to).


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r129628663
  
    --- Diff: geode-protobuf/src/main/proto/clientProtocol.proto ---
    @@ -66,7 +66,7 @@ message Response {
             RemoveAllResponse removeAllResponse = 7;
             ListKeysResponse listKeysResponse = 8;
     
    -        ErrorResponse errorResponse = 13;
    +        Error error = 13;
    --- End diff --
    
    To keep the "Response -> OperationalResponse" hierarchy, I'd prefer to keep "ErrorResponse" that contains an "Error" object.
    We _could_ inline it, but it detracts from the modus-operandi


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r129626228
  
    --- Diff: geode-protobuf/src/main/proto/clientProtocol.proto ---
    @@ -66,7 +66,7 @@ message Response {
             RemoveAllResponse removeAllResponse = 7;
             ListKeysResponse listKeysResponse = 8;
     
    -        ErrorResponse errorResponse = 13;
    +        Error error = 13;
    --- End diff --
    
    The reasoning is, we're not just using it as an ErrorResponse at the same level as a PutResponse or GetResponse -- it gets embedded in other responses now.


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r128652774
  
    --- Diff: geode-protobuf/src/main/proto/basicTypes.proto ---
    @@ -62,4 +62,14 @@ message Region {
     
     message Server {
         string url = 1;
    -}
    \ No newline at end of file
    +}
    +
    +message Error {
    --- End diff --
    
    These are the same fields as ErrorResponse and KeyedErrorResponse in the outstanding PutAll pull request, can you comment in that PR to change the names if you prefer these?


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r128847166
  
    --- Diff: geode-protobuf/src/main/proto/clientProtocol.proto ---
    @@ -66,7 +66,7 @@ message Response {
             RemoveAllResponse removeAllResponse = 7;
             ListKeysResponse listKeysResponse = 8;
     
    -        ErrorResponse errorResponse = 13;
    +        Error error = 13;
    --- End diff --
    
    Why has this been renamed to Error from ErrorResponse? Imo, we are following the pattern (good or bad) that a ClientProtocol.Response contains an Operation specific response. To now have a non-"Response" message sort of breaks the mold.


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r129626464
  
    --- Diff: geode-protobuf/src/main/proto/basicTypes.proto ---
    @@ -62,4 +62,14 @@ message Region {
     
     message Server {
         string url = 1;
    -}
    \ No newline at end of file
    +}
    +
    +message Error {
    +    int32 errorCode = 1;
    +    string message = 2;
    +}
    +
    +message ErrorEntry {
    --- End diff --
    
    That's fine too. I don't have a real strong preference.


---
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] geode pull request #649: GEODE-2997: Change new protocol GetAllResponse.

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

    https://github.com/apache/geode/pull/649#discussion_r128848930
  
    --- Diff: geode-protobuf/src/main/proto/basicTypes.proto ---
    @@ -62,4 +62,14 @@ message Region {
     
     message Server {
         string url = 1;
    -}
    \ No newline at end of file
    +}
    +
    +message Error {
    +    int32 errorCode = 1;
    +    string message = 2;
    +}
    +
    +message ErrorEntry {
    --- End diff --
    
    Tbh, I'm not ecstatic about the name. I'd prefer `FailedEntry`


---
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] geode issue #649: GEODE-2997: Change new protocol GetAllResponse.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal commented on the issue:

    https://github.com/apache/geode/pull/649
  
    closing for #739 .


---
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.
---