lint fixes over initial orc import#68
Conversation
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
There is currently no plan to use raft. So, we should eventually delete this entire dependency. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
shlomi-noach
left a comment
There was a problem hiding this comment.
what's the deal with all the JS/templates "added files"?
This entire PR seems just like automated linter with no actual changes. @sougou I think this is not the PR we wanted?
| log.Fatale(err) | ||
| } | ||
| fmt.Println(fmt.Sprintf("%s<%s", instanceKey.DisplayString(), destinationKey.DisplayString())) | ||
| fmt.Printf("%s<%s\n", instanceKey.DisplayString(), destinationKey.DisplayString()) |
There was a problem hiding this comment.
Out of curiosity, were these changes automated by some tool? If so, which and how?
| c.Lock() | ||
| defer c.Unlock() | ||
| c.Lock() //nolint SA5011: possible nil pointer dereference | ||
| defer c.Unlock() //nolint SA5011: possible nil pointer dereference |
There was a problem hiding this comment.
possible nil pointer dereference
incorrect. bad linter ☝️
| func isInMemorySQLite() bool { | ||
| return config.Config.IsSQLite() && strings.Contains(config.Config.SQLite3DataFile, ":memory:") | ||
| } | ||
|
|
There was a problem hiding this comment.
I would encourage to keep this function. True, it's not used in today's code, but it may be used in tomorrow's code.
| return | ||
| } | ||
| instanceKey, err := this.getInstanceKey(params["host"], params["port"]) | ||
| instanceKey, _ := this.getInstanceKey(params["host"], params["port"]) |
There was a problem hiding this comment.
The linter should have suggested to check the err value instead of completely muting it.
| ErrantGTIDStructureWarning StructureAnalysisCode = "ErrantGTIDStructureWarning" | ||
| NoFailoverSupportStructureWarning StructureAnalysisCode = "NoFailoverSupportStructureWarning" | ||
| NoWriteableMasterStructureWarning StructureAnalysisCode = "NoWriteableMasterStructureWarning" | ||
| NotEnoughValidSemiSyncReplicasStructureWarning StructureAnalysisCode = "NotEnoughValidSemiSyncReplicasStructureWarning" |
| distributionReentry int64 | ||
| client *consulapi.Client | ||
| kvCache *cache.Cache | ||
| distributionReentry int64 |
| CoMasterRecovery = "CoMasterRecovery" | ||
| IntermediateMasterRecovery = "IntermediateMasterRecovery" | ||
| CoMasterRecovery RecoveryType = "CoMasterRecovery" | ||
| IntermediateMasterRecovery RecoveryType = "IntermediateMasterRecovery" |
| MasterRecoveryBinlogServer = "MasterRecoveryBinlogServer" | ||
| MasterRecoveryGTID MasterRecoveryType = "MasterRecoveryGTID" | ||
| MasterRecoveryPseudoGTID MasterRecoveryType = "MasterRecoveryPseudoGTID" | ||
| MasterRecoveryBinlogServer MasterRecoveryType = "MasterRecoveryBinlogServer" |
| const ( | ||
| OrchestratorExecutionCliMode OrchestratorExecutionMode = "CLIMode" | ||
| OrchestratorExecutionHttpMode = "HttpMode" | ||
| OrchestratorExecutionHttpMode OrchestratorExecutionMode = "HttpMode" |
| discover(hostname, mySQLPort) | ||
| }); | ||
|
|
||
| }); |
There was a problem hiding this comment.
I think this should have been part of the initial import, which I later added...
sougou
left a comment
There was a problem hiding this comment.
I just saw your comments. Unfortunately it was after merging the other PR. But we can fix forward as needed.
| discover(hostname, mySQLPort) | ||
| }); | ||
|
|
||
| }); |
There was a problem hiding this comment.
I think this should have been part of the initial import, which I later added...
|
The fixes were made by me manually. I started adding those additional error checks, but got cold feet because they could change existing behavior. So, I erred on the side of preserving existing behavior. |
No description provided.