wtperf.c main() has logic that generates non default configuration strings. These generated strings are added as an entry in the queue "opts->config_head". This ticket fixes two issues:
- The above code even when no non-default configuration to generate, creates empty configuration with commas, something like ",,,". This in itself is a bug
- The above code generates an entry and adds to the queue (an empty comma filled entry if no non-default configuration was generated). config_consolidate() is used to consolidate queue entries with same keys. Consolidation is done before dumping the configuration in WT_TEST/CONFIG.wtperf. Consolidation function looks for entries with same configuration key, and discards all except the last one in the queue. (this would be empty ",,," in most cases). Consolidate should concatenate the strings and not discard the previous ones, because WiredTiger would have actually applied them during the test.
This change fixes the non-default configuration generation code. It won't generate those unnecessary commas anymore. Also I changed consolidate to concatenate queue entries with same configuration key.
For instance, for the following configuration:
Following is dumped in logs: