Skip to content
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 lib/records/P_RecDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// additional slots in librecords will be allocated to the plugin metrics. These should be
// updated if we change the internal librecords size significantly.
#define REC_INTERNAL_RECORDS 1100
#define REC_MIN_API_RECORDS 500
#define REC_DEFAULT_API_RECORDS 1400

#define REC_CONFIG_UPDATE_INTERVAL_MS 3000
#define REC_REMOTE_SYNC_INTERVAL_MS 5000
Expand Down
2 changes: 1 addition & 1 deletion lib/records/RecCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

// This is needed to manage the size of the librecords record. It can't be static, because it needs to be modified
// and used (read) from several binaries / modules.
int max_records_entries = REC_INTERNAL_RECORDS + REC_MIN_API_RECORDS;
int max_records_entries = REC_INTERNAL_RECORDS + REC_DEFAULT_API_RECORDS;

static bool g_initialized = false;

Expand Down
3 changes: 2 additions & 1 deletion mgmt/api/CoreAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ ProxyStateSet(TSProxyStateT state, TSCacheClearT clear)

// Start with the default options from records.config.
if (RecGetRecordString_Xmalloc("proxy.config.proxy_binary_opts", &proxy_options) == REC_ERR_OKAY) {
if (max_records_entries == (REC_INTERNAL_RECORDS + REC_MIN_API_RECORDS)) { // Default size, don't need to pass down to _server
if (max_records_entries ==
(REC_INTERNAL_RECORDS + REC_DEFAULT_API_RECORDS)) { // Default size, don't need to pass down to _server
snprintf(tsArgs, sizeof(tsArgs), "%s", proxy_options);
} else {
snprintf(tsArgs, sizeof(tsArgs), "%s --maxRecords %d", proxy_options, max_records_entries);
Expand Down