diff --git a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java index 186c0ace882f879f74e1f3ad775be79c07f65690..52c0e50de8e9e09533646feb3ec429113670a0ed 100644 --- a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java +++ b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java @@ -299,11 +299,13 @@ public class CoreWorkload extends Workload { /** * How many times to retry when insertion of a single item to a DB fails. */ + public static final String INSERTION_RETRY_LIMIT = "core_workload_insertion_retry_limit"; public static final String INSERTION_RETRY_LIMIT_DEFAULT = "0"; /** * On average, how long to wait between the retries, in seconds. */ + public static final String INSERTION_RETRY_INTERVAL = "core_workload_insertion_retry_interval"; public static final String INSERTION_RETRY_INTERVAL_DEFAULT = "3"; IntegerGenerator keysequence; @@ -490,10 +492,10 @@ public class CoreWorkload extends Workload { } insertionRetryLimit = Integer.parseInt(p.getProperty( - "insertionretrylimit", INSERTION_RETRY_LIMIT_DEFAULT)); + INSERTION_RETRY_LIMIT, INSERTION_RETRY_LIMIT_DEFAULT)); insertionRetryInterval = Integer.parseInt(p.getProperty( - "insertionretryinterval", INSERTION_RETRY_INTERVAL_DEFAULT)); + INSERTION_RETRY_INTERVAL, INSERTION_RETRY_INTERVAL_DEFAULT)); } public String buildKeyName(long keynum) { diff --git a/workloads/workload_template b/workloads/workload_template index abf2f8ccf6fb1916d22f787d76b4dd27a95f098e..f5e80c8899e0e66ab41ea7a2add5c4a511dcb5e5 100644 --- a/workloads/workload_template +++ b/workloads/workload_template @@ -157,14 +157,15 @@ timeseries.granularity=1000 # reportlatencyforeacherror=false # latencytrackederrors="<comma separated strings of error codes>" -# Insertion error retry +# Insertion error retry for the core workload. # -# By default, YCSB does not retry any operations. However, during the -# load process, if any insertion fails, the entire load process is terminated. +# By default, the YCSB core workload does not retry any operations. +# However, during the load process, if any insertion fails, the entire +# load process is terminated. # If a user desires to have more robust behavior during this phase, they can # enable retry for insertion by setting the following property to a positive # number. -# insertionretrylimit = 0 +# core_workload_insertion_retry_limit = 0 # # the following number controls the interval between retries (in seconds): -# insertionretryinterval = 3 +# core_workload_insertion_retry_interval = 3