Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-3961: Improve error message for zookeeper.intBufferStarting… #1714

Closed
wants to merge 2 commits into from

Conversation

rpinzon
Copy link
Contributor

@rpinzon rpinzon commented Jun 16, 2021

…SizeBytes config

@rpinzon
Copy link
Contributor Author

rpinzon commented Jun 16, 2021

I was considering moving the variable declaration at line 242 to line 240. In this way, the documentation provided from line 236 to 239 will be visible from external caller code (src/main/java/org/apache/zookeeper/server/ServerCnxn.java:198).

    /**
     * Starting size of read and write ByteArroyOuputBuffers. Default is 32 bytes.
     * Flag not used for small transfers like connectResponses.
     */
    public static final int intBufferStartingSizeBytes;
    public static final String INT_BUFFER_STARTING_SIZE_BYTES = "zookeeper.intBufferStartingSizeBytes";
    public static final int DEFAULT_STARTING_BUFFER_SIZE = 1024;

instead of

    /**
     * Starting size of read and write ByteArroyOuputBuffers. Default is 32 bytes.
     * Flag not used for small transfers like connectResponses.
     */
    public static final String INT_BUFFER_STARTING_SIZE_BYTES = "zookeeper.intBufferStartingSizeBytes";
    public static final int DEFAULT_STARTING_BUFFER_SIZE = 1024;
    public static final int intBufferStartingSizeBytes;

Does it make sense?

@asfgit asfgit closed this in e642a32 Jul 11, 2021
@maoling
Copy link
Member

maoling commented Jul 11, 2021

  • Test it.
    2021-07-11 18:50:41,011 [myid:] - ERROR [main:ZooKeeperServer@258] - Buffer starting size (31) must be greater than or equal to 32. Configure with "-Dzookeeper.intBufferStartingSizeBytes=<size>"
  • @rpinzon Thanks for your contribution.

anuragmadnawat1 pushed a commit to anuragmadnawat1/zookeeper that referenced this pull request Nov 2, 2022
…SizeBytes config

Author: Renan Tomazoni Pinzon <rpinzon@gmail.com>

Reviewers: Beluga Behr <dam6923@gmail.com>, maoling <maoling@apache.org>

Closes apache#1714 from rpinzon/master and squashes the following commits:

1b2c474 [Renan Tomazoni Pinzon] ZOOKEEPER-3961: Improve error message for zookeeper.intBufferStartingSizeBytes config
f3c5a74 [Renan Tomazoni Pinzon] ZOOKEEPER-3961: Improve error message for zookeeper.intBufferStartingSizeBytes config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants