aws / aws/amazon-documentdb-odbc-driver
Add locks on getLoggerInstance
- Dominant language
- C++
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
If multiple threads try to get the logger instance, 2 logger instances might be created at the same time. This may or may not be an actual issue. Note that locks would impair the run time.
Example:
```C
// pseudo-code
getLoggerInstance() {
// get lock
if (!_logger)
_logger = new Logger();
// unlock
return _logger;
}
```
AC:
- add lock protection to getLoggerInstance
Contributor guide
Research direction
Locate getLoggerInstance in the driver and inspect how the logger singleton is initialized. Add the requested lock protection, then verify that concurrent calls cannot create multiple logger instances and consider the runtime cost noted in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100