[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15932759#comment-15932759
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user asfgit closed the pull request at:

https://github.com/apache/geode-native/pull/48


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15903305#comment-15903305
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r105204008
  
--- Diff: src/cppcache/include/geode/DataOutput.hpp ---
@@ -378,9 +378,8 @@ class CPPCACHE_EXPORT DataOutput {
  */
   inline void writeFullUTF(const char* value, uint32_t length = 0) {
--- End diff --

ICKY, sounds like a separable refactoring chore...


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900629#comment-15900629
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104836958
  
--- Diff: src/cppcache/include/geode/DataOutput.hpp ---
@@ -378,9 +378,8 @@ class CPPCACHE_EXPORT DataOutput {
  */
   inline void writeFullUTF(const char* value, uint32_t length = 0) {
--- End diff --

I agree and tried to move it to TcrMessage. However, its implementation 
depends on private members of DataOutput.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900453#comment-15900453
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user pivotal-jbarrett commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104816808
  
--- Diff: src/cppcache/include/geode/DataOutput.hpp ---
@@ -378,9 +378,8 @@ class CPPCACHE_EXPORT DataOutput {
  */
   inline void writeFullUTF(const char* value, uint32_t length = 0) {
--- End diff --

If we are being sticklers and consistent this method has no business here. 
It is only used by the Message writeStringPart and should really be implemented 
there.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900086#comment-15900086
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104769260
  
--- Diff: src/cppcache/test/TcrMessage_unittest.cpp ---
@@ -559,3 +560,66 @@ TEST_F(TcrMessageTest, 
testConstructorEXECUTE_FUNCTION) {
   "75746546756E6374696F6E00030157",
   testMessage);
 }
+
+TEST_F(TcrMessageTest, testConstructorEXECUTECQ_MSG_TYPE) {
+  CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
+
+  TcrMessageExecuteCq testMessage("ExecuteCQ", "select * from /somewhere",
+  CqState::RUNNING, false,
+  static_cast(NULL));
+
+  EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+  
"002A00450900457865637574654351001800"
+  
"73656C656374202A2066726F6D202F736F6D65776865726500040100"
+  "0100010001",
+  testMessage);
+}
+
+TEST_F(TcrMessageTest, 
testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE) {
--- End diff --

I'm unaware of the SI definition of ginormous...


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900083#comment-15900083
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104769132
  
--- Diff: src/cppcache/test/DataOutputTest.cpp ---
@@ -305,15 +305,9 @@ TEST_F(DataOutputTest, TestCursorAdvance) {
   "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
   dataOutput.getByteArray());
 
-  EXPECT_EQ((2 + 27), dataOutput.getBufferLength());
-
-  // buffers are pre-allocated 8k and have 2 bytes to hold the data length
-  EXPECT_EQ(((8 * 1024) - (2 + 27)), 
dataOutput.getRemainingBufferLength());
--- End diff --

getRemainingBufferLength() is the call that exhibited less-than-obvious 
behavior. In particular, it appears to be affected by some global state. Its 
return value was not predictable enough to be tested in that manner.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900082#comment-15900082
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104768886
  
--- Diff: src/cppcache/include/geode/DataOutput.hpp ---
@@ -378,9 +378,8 @@ class CPPCACHE_EXPORT DataOutput {
  */
   inline void writeFullUTF(const char* value, uint32_t length = 0) {
 if (value != NULL) {
-  int32_t len = getEncodedLength(value, length);
-  uint16_t encodedLen = static_cast(len > 0x ? 0x : 
len);
--- End diff --

If the query string happened to be longer that 0x, it would be 
artificially truncated which often led to errors on the server side.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900077#comment-15900077
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104768254
  
--- Diff: src/cppcache/test/TcrMessage_unittest.cpp ---
@@ -559,3 +560,66 @@ TEST_F(TcrMessageTest, 
testConstructorEXECUTE_FUNCTION) {
   "75746546756E6374696F6E00030157",
   testMessage);
 }
+
+TEST_F(TcrMessageTest, testConstructorEXECUTECQ_MSG_TYPE) {
+  CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
+
+  TcrMessageExecuteCq testMessage("ExecuteCQ", "select * from /somewhere",
+  CqState::RUNNING, false,
+  static_cast(NULL));
+
+  EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+  
"002A00450900457865637574654351001800"
+  
"73656C656374202A2066726F6D202F736F6D65776865726500040100"
+  "0100010001",
+  testMessage);
+}
+
+TEST_F(TcrMessageTest, 
testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE) {
--- End diff --

I'm not certain that this query's magnitude qualifies for ginormity... 
maybe we just call it test*64KiBQuery* - lest we set the bar low for 
ginormous...


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900078#comment-15900078
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104766406
  
--- Diff: src/cppcache/include/geode/DataOutput.hpp ---
@@ -378,9 +378,8 @@ class CPPCACHE_EXPORT DataOutput {
  */
   inline void writeFullUTF(const char* value, uint32_t length = 0) {
 if (value != NULL) {
-  int32_t len = getEncodedLength(value, length);
-  uint16_t encodedLen = static_cast(len > 0x ? 0x : 
len);
--- End diff --

what was the corner case impact of this line?


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900076#comment-15900076
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104766552
  
--- Diff: src/cppcache/test/DataOutputTest.cpp ---
@@ -305,15 +305,9 @@ TEST_F(DataOutputTest, TestCursorAdvance) {
   "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
   dataOutput.getByteArray());
 
-  EXPECT_EQ((2 + 27), dataOutput.getBufferLength());
-
-  // buffers are pre-allocated 8k and have 2 bytes to hold the data length
-  EXPECT_EQ(((8 * 1024) - (2 + 27)), 
dataOutput.getRemainingBufferLength());
--- End diff --

What led you to removing the call to getRemainingBufferLength()?


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900075#comment-15900075
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104759431
  
--- Diff: src/cppcache/src/TcrMessage.hpp ---
@@ -555,7 +555,7 @@ class CPPCACHE_EXPORT TcrMessage {
const VectorOfCacheableKey* getAllKeyList = NULL);
   void writeHeader(uint32_t msgType, uint32_t numOfParts);
   void writeRegionPart(const std::string& regionName);
-  void writeStringPart(const std::string& regionName);
+  void writeStringPart(const std::string& str);
--- End diff --

the aforementioned copy/pasting...


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900074#comment-15900074
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user echobravopapa commented on a diff in the pull request:

https://github.com/apache/geode-native/pull/48#discussion_r104759602
  
--- Diff: src/cppcache/src/TcrMessage.cpp ---
@@ -756,8 +756,8 @@ void TcrMessage::writeRegionPart(const std::string& 
regionName) {
   m_request->writeBytesOnly((int8_t*)regionName.c_str(), len);
 }
 
-void TcrMessage::writeStringPart(const std::string& regionName) {
-  m_request->writeFullUTF(regionName.c_str());
+void TcrMessage::writeStringPart(const std::string& str) {
--- End diff --

here as well, much more intuitive var name


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1597#comment-1597
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

GitHub user PivotalSarge opened a pull request:

https://github.com/apache/geode-native/pull/48

GEODE-2578: Remove 64 KiB limit on query strings.

- Remove artificial cap of 65535 for query string
  length by using 32 bits for the length of query
  strings in DataOutput::writeFullUTF().
- Rename parameter to TcrMessage::writeStringPart()
  whose name is misleading due to copy-and-paste.
- Add three unit tests for query-related messages:
  * testConstructorEXECUTECQ_MSG_TYPE
  * testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE
  * testConstructorEXECUTECQ_WITH_IR_MSG_TYPE
- Fix the cursor advance tests to not depend on
  specific values for buffer length and not to
  test remaining buffer length.

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

$ git pull https://github.com/PivotalSarge/geode-native feature/GEODE-2578

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

https://github.com/apache/geode-native/pull/48.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 #48


commit 128ab410d3aaae69186c0a41ed3a1310ef982382
Author: Sarge 
Date:   2017-03-07T19:26:53Z

GEODE-2578: Remove 64 KiB limit on query strings.

- Remove artificial cap of 65535 for query string
  length by using 32 bits for the length of query
  strings in DataOutput::writeFullUTF().
- Rename parameter to TcrMessage::writeStringPart()
  whose name is misleading due to copy-and-paste.
- Add three unit tests for query-related messages:
  * testConstructorEXECUTECQ_MSG_TYPE
  * testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE
  * testConstructorEXECUTECQ_WITH_IR_MSG_TYPE
- Fix the cursor advance tests to not depend on
  specific values for buffer length and not to
  test remaining buffer length.




> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899772#comment-15899772
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on the issue:

https://github.com/apache/geode-native/pull/44
  
Roger that. Expect a new PR forthwith...

Sarge

> On 7 Mar, 2017, at 08:10, Jacob Barrett  wrote:
> 
> @PivotalSarge  can you rebase your 
branch off of develop. We backed out all those C++11 changes and now they are 
showing up in your pull.
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub 
, or 
mute the thread 
.
> 




> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899745#comment-15899745
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge closed the pull request at:

https://github.com/apache/geode-native/pull/44


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15899669#comment-15899669
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user pivotal-jbarrett commented on the issue:

https://github.com/apache/geode-native/pull/44
  
@PivotalSarge can you rebase your branch off of develop. We backed out all 
those C++11 changes and now they are showing up in your pull. 


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15898168#comment-15898168
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user PivotalSarge commented on the issue:

https://github.com/apache/geode-native/pull/44
  
The unit tests failed on Linux but not other platforms. It turns out that 
DataOutput has some not-very-obvious (and apparently platform-specific) 
behavior around buffer management that results in the return values from 
getBufferLength() and getRemainingBufferLength() depending on the behavior of 
other unit tests that may precede them. Hence, the test of ginormous query 
strings was causing the return values of those methods to differ from what 
would be returned if that test was *not* run. So I reworked how the DataOutput 
cursor advancement unit tests work and created GEODE-2598 to understand and 
test how DataOutput's buffer management works.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897556#comment-15897556
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

Github user pivotal-jbarrett commented on the issue:

https://github.com/apache/geode-native/pull/44
  
@PivotalSarge looks like some unit tests are failing.


> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2578) Query string limited to 64 KiB

2017-03-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15893191#comment-15893191
 ] 

ASF GitHub Bot commented on GEODE-2578:
---

GitHub user PivotalSarge opened a pull request:

https://github.com/apache/geode-native/pull/44

GEODE-2578: Remove 64 KiB limit on query strings.

- Remove artificial cap of 65535 for query string
  length by using 32 bits for the length of query
  strings in DataOutput::writeFullUTF().
- Rename parameter to TcrMessage::writeStringPart()
  whose name is misleading due to copy-and-paste.
- Add three unit tests for query-related messages:
  * testConstructorEXECUTECQ_MSG_TYPE
  * testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE
  * testConstructorEXECUTECQ_WITH_IR_MSG_TYPE

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

$ git pull https://github.com/PivotalSarge/geode-native feature/GEODE-2578

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

https://github.com/apache/geode-native/pull/44.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 #44


commit 542c6349c7194558f463732a96a0e32a216a17a3
Author: Sarge 
Date:   2017-03-02T22:45:37Z

GEODE-2578: Remove 64 KiB limit on query strings.

- Remove artificial cap of 65535 for query string
  length by using 32 bits for the length of query
  strings in DataOutput::writeFullUTF().
- Rename parameter to TcrMessage::writeStringPart()
  whose name is misleading due to copy-and-paste.
- Add three unit tests for query-related messages:
  * testConstructorEXECUTECQ_MSG_TYPE
  * testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE
  * testConstructorEXECUTECQ_WITH_IR_MSG_TYPE




> Query string limited to 64 KiB
> --
>
> Key: GEODE-2578
> URL: https://issues.apache.org/jira/browse/GEODE-2578
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Michael Dodge
>Assignee: Michael Dodge
>
> The serialization of query strings uses a 16-bit unsigned integer to 
> represent the length of the query string. Query strings with more than 65535 
> characters are silently truncated. Use of a 32-bit unsigned integer to 
> represent the length would greatly increase the size of query strings that 
> may be used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)