rocksdb/env
Andrew Kryczka 9bb13c56b3 Use system-wide thread ID in info log lines (#9164)
Summary:
This makes it easier to debug with tools like `ps`. The change only
applies to builds with glibc 2.30+ and _GNU_SOURCE extensions enabled.
We could adopt it in more cases by using the syscall but this is enough
for our build.

Replaces https://github.com/facebook/rocksdb/issues/2973.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9164

Test Plan:
- ran some benchmarks and correlated logged thread IDs with those shown by `ps -L`.
- verified no noticeable regression in throughput for log heavy (more than 700k log lines and over 5k / second) scenario.

Benchmark command:

```
$ TEST_TMPDIR=/dev/shm ./db_bench -benchmarks=filluniquerandom -compression_type=none -max_bytes_for_level_multiplier=2 -write_buffer_size=262144 -num_levels=7 -max_bytes_for_level_base=2097152 -target_file_size_base=524288 -level_compaction_dynamic_level_bytes=true -max_background_jobs=12 -num=20000000
```

Results before: 15.9MB/s, 15.8MB/s, 16.0MB/s
Results after: 16.3MB/s, 16.3MB/s, 15.8MB/s

- Rely on CI to test the fallback behavior

Reviewed By: riversand963

Differential Revision: D32399660

Pulled By: ajkr

fbshipit-source-id: c24d44fdf7782faa616ef0a0964eaca3539d9c24
2021-11-12 19:46:06 -08:00
..
composite_env_wrapper.h Integrated BlobDB for backup/restore support (#8129) 2021-04-07 13:38:54 -07:00
composite_env.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
emulated_clock.h Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env_basic_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env_chroot.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_chroot.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_encryption_ctr.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_encryption.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_hdfs.cc Use thread-safe strerror_r() to get error message (#8087) 2021-03-24 23:07:27 -07:00
env_posix.cc Use system-wide thread ID in info log lines (#9164) 2021-11-12 19:46:06 -08:00
env_test.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
file_system_tracer.cc Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
file_system_tracer.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
file_system.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
fs_posix.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
fs_readonly.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
fs_remap.cc Make backups openable as read-only DBs (#8142) 2021-04-06 14:37:53 -07:00
fs_remap.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
io_posix_test.cc Status check enforcement for io_posix_test and options_settable_test (#6857) 2020-05-19 19:22:28 -07:00
io_posix.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
io_posix.h Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
mock_env_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
mock_env.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
mock_env.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
unique_id_gen.cc Experimental support for SST unique IDs (#8990) 2021-10-18 23:32:01 -07:00
unique_id_gen.h Experimental support for SST unique IDs (#8990) 2021-10-18 23:32:01 -07:00