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

INTERNAL: Update MAX_KEYS_FOR_MULTI_STORE_OPERATION from 200 to 500 #310

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libmemcached/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#define MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT 1

#define MAX_SERVERS_FOR_MULTI_KEY_OPERATION 1000
#define MAX_KEYS_FOR_MULTI_STORE_OPERATION 200
#define MAX_KEYS_FOR_MULTI_STORE_OPERATION 500

enum memcached_server_distribution_t {
MEMCACHED_DISTRIBUTION_MODULA,
Expand Down
2 changes: 1 addition & 1 deletion tests/storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace libtest;

#include "tests/storage.h"

#define REQ_COUNT MAX_KEYS_FOR_MULTI_STORE_OPERATION
#define REQ_COUNT 100
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/storage.cc: In function ‘bool do_mappend_and_get(memcached_st*, bool)’:
tests/storage.cc:530:1: error: the frame size of 58032 bytes is larger than 32768 bytes [-Werror=frame-larger-than=]
  530 | }
      | ^
tests/storage.cc: In function ‘bool do_mprepend_and_get(memcached_st*, bool)’:
tests/storage.cc:435:1: error: the frame size of 58032 bytes is larger than 32768 bytes [-Werror=frame-larger-than=]
  435 | }
      | ^
tests/storage.cc: In function ‘bool do_mcas_and_get(memcached_st*, bool)’:
tests/storage.cc:675:1: error: the frame size of 70176 bytes is larger than 32768 bytes [-Werror=frame-larger-than=]
  675 | }
      | ^
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-nested-anon-types’ [-Werror]

REQ_COUNT는 아래와 같이 사용하고 있는데, 로컬 변수 크기 때문에 문제 발생하는 듯 하여 수치를 조정했습니다.

static bool do_mappend_and_get(memcached_st *mc, bool is_noreply)
{
  memcached_storage_request_st set_req[REQ_COUNT];
  memcached_storage_request_st append_req[REQ_COUNT];

#define SMALL_BUFFER_SIZE 64
#define LARGE_BUFFER_SIZE 1000 * 1000
#define EXPIRE_TIME 60
Expand Down
Loading