Skip to content

Commit

Permalink
[core] Incorporate CR feedback
Browse files Browse the repository at this point in the history
Prefix the retry limit property name with core_workload.

[core] Incorporate CR Feedback

Prefix the retry limit property with "core_workload".
  • Loading branch information
stfeng2 committed Dec 12, 2015
1 parent ad8404a commit 94c2b23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 4 additions & 2 deletions core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -490,10 +492,10 @@ public void init(Properties p) throws WorkloadException {
}

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) {
Expand Down
11 changes: 6 additions & 5 deletions workloads/workload_template
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 94c2b23

Please sign in to comment.