Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit bd79521e authored by Michael Ott's avatar Michael Ott
Browse files

Reduce paging size for job queries to 100

parent 6cdeffca
......@@ -45,6 +45,7 @@
#define SENSORDATA_GC_GRACE_SECONDS "600"
#define SENSORDATA_COMPACTION "{'class' : 'TimeWindowCompactionStrategy', 'compaction_window_unit' : 'DAYS', 'compaction_window_size' : 1 }"
#define PAGING_SIZE 10000
#define JOB_PAGING_SIZE 100
#define CONFIG_KEYSPACE_NAME KEYSPACE_NAME "_config"
#define CF_PUBLISHEDSENSORS "publishedsensors"
......
......@@ -527,7 +527,7 @@ JDError JobDataStoreImpl::getJobsInIntervalExcl(std::list<JobData>& jobs,
" WHERE domain = ? AND end_ts <= ? AND start_ts >= ? ALLOW FILTERING;";
statement = cass_statement_new(query, 3);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalEnd.getRaw());
......@@ -569,7 +569,7 @@ JDError JobDataStoreImpl::getJobsInIntervalIncl(std::list<JobData>& jobs,
" WHERE domain = ? AND start_ts >= ? AND start_ts <= ? ALLOW FILTERING;";
statement = cass_statement_new(query, 3);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalStart.getRaw());
......@@ -583,7 +583,7 @@ JDError JobDataStoreImpl::getJobsInIntervalIncl(std::list<JobData>& jobs,
" WHERE domain = ? AND end_ts >= ? AND end_ts <= ? ALLOW FILTERING;";
statement = cass_statement_new(query, 3);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalStart.getRaw());
......@@ -626,7 +626,7 @@ JDError JobDataStoreImpl::getJobsInIntervalRunning(std::list<JobData>& jobs,
" WHERE domain = ? AND end_ts = ? AND start_ts < ? AND start_ts > ?;";
statement = cass_statement_new(query, 4);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, (int64_t)0);
......@@ -641,7 +641,7 @@ JDError JobDataStoreImpl::getJobsInIntervalRunning(std::list<JobData>& jobs,
" WHERE domain = ? AND end_ts > ? AND start_ts < ? AND start_ts > ? ALLOW FILTERING;";
statement = cass_statement_new(query, 4);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalStart.getRaw());
......@@ -681,7 +681,7 @@ JDError JobDataStoreImpl::getJobsInIntervalFinished(std::list<JobData>& jobs,
" WHERE domain = ? AND end_ts > ? AND end_ts < ? AND start_ts > ? ALLOW FILTERING;";
statement = cass_statement_new(query, 4);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalStart.getRaw());
......@@ -721,7 +721,7 @@ JDError JobDataStoreImpl::getJobsInIntervalPending(std::list<JobData>& jobs,
" WHERE domain = ? AND start_ts > ? ALLOW FILTERING;";
statement = cass_statement_new(query, 2);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, intervalStart.getRaw());
......@@ -734,7 +734,7 @@ JDError JobDataStoreImpl::getJobsInIntervalPending(std::list<JobData>& jobs,
" WHERE domain = ? AND start_ts = ? ALLOW FILTERING;";
statement = cass_statement_new(query, 2);
cass_statement_set_paging_size(statement, PAGING_SIZE);
cass_statement_set_paging_size(statement, JOB_PAGING_SIZE);
cass_statement_bind_string(statement, 0, domainId.c_str());
cass_statement_bind_int64(statement, 1, (int64_t)0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment