-
Notifications
You must be signed in to change notification settings - Fork 273
Description
Code
From function initialGlobal, we can see that global tableName variable is get from property file with field name table if it is empty

but in initClientCommand, there is a flag setting the global tableName variable, so when we set it in cmd flags, it will always has value when it goes into intialGlobal and check its length

and in all db implementations, they are using tableName from property file, take mysql as an example

Debug
./go-ycsb load mysql -P "my.properties,workloads/workloada" --table ddd --target 100 --threads 5
in workloads/workloada
table=ccc
global variable in main.go

variable in db implementation mysql

we can see they are different
More
By digging deeper, I found that the DB field defined in prop.go is not used anywhere. The db implementations are using dbName from global variable and is set by command flag, in the mean time, we can see that the real tableName takes effect is from property file, the different ways we set these two associated variables make user confuse.
Suggestion
We should make it clean and unique, either we set these two variables by cmd flags, or by property file.