Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDK: Ensure AirbyteLogger is thread-safe using Lock (#9943)
* Ensure AirbyteLogger is thread-safe - Introduce a global lock to ensure `AirbyteLogger` is thread-safe. - The `logging` module is thread-safe, however `print` is not, and is currently used. This means that messages sent to stdout can clash if connectors use threading. This is obviously a huge problem when the IPC between the source/destination is stdout! - A `multiprocessing.Lock` could have been introduced however given that `logging` module is not multiprocess-safe I thought that thread-safety should be first goal. - IMO the `AirbyteLogger` should be a subclass of the `logging.Logger` so you have thread-safety automatically, however I didn't want to make a huge wholesale change here. * Revert lock and add deprecation warning instead
- Loading branch information