Revert grabbing lock in database Connection funcs
This commit is contained in:
parent
e6d60ee551
commit
7e033efa4c
|
@ -116,9 +116,6 @@ func (c *cassandraConnectionProducer) Initialize(ctx context.Context, conf map[s
|
|||
}
|
||||
|
||||
func (c *cassandraConnectionProducer) Connection(_ context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, connutil.ErrNotInitialized
|
||||
}
|
||||
|
|
|
@ -90,9 +90,6 @@ func (c *mongoDBConnectionProducer) Initialize(ctx context.Context, conf map[str
|
|||
|
||||
// Connection creates a database connection.
|
||||
func (c *mongoDBConnectionProducer) Connection(_ context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, connutil.ErrNotInitialized
|
||||
}
|
||||
|
|
|
@ -76,9 +76,6 @@ func (c *SQLConnectionProducer) Initialize(ctx context.Context, conf map[string]
|
|||
}
|
||||
|
||||
func (c *SQLConnectionProducer) Connection(ctx context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, ErrNotInitialized
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue