```
create table default.DFA(A Int64) Engine=MergeTree  order by tuple();
create table default.DFAD as default.DFA Engine=Distributed(test_shard_localhost, default, DFA)

 mkdir /var/lib/clickhouse/data/default/DFAD/shard1_replica1,shard1_replica2
chown -R clickhouse.clickhouse /var/lib/clickhouse/data/default/DFAD/shard1_replica1,shard1_replica2/

/etc/init.d/clickhouse-server restart


<Fatal> BaseDaemon: ########################################
<Fatal> BaseDaemon: (version 20.8.1.4436, build id: 30B7E2A4815769B9) (from thread 21305) (no query) Received signal Segmentation fault (11)
<Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
<Fatal> BaseDaemon: Stack trace: 0x17a585f5 0x1783c5de 0x17841b4e 0x17841ea0 0x1715a672 0xff3df97 0xff3e70a 0xff3d4a7 0xff3bae3 0x7f411ecd9fa3 0x7f411ebfb4

<Fatal> BaseDaemon: 3. DB::StorageDistributedDirectoryMonitor::createPool(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<cha
t&) @ 0x17a585f5 in /usr/bin/clickhouse
<Fatal> BaseDaemon: 4. DB::StorageDistributed::requireDirectoryMonitor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>
td::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1783c5de in /usr/bin/clickhouse
<Fatal> BaseDaemon: 5. DB::StorageDistributed::createDirectoryMonitors(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>
house
<Fatal> BaseDaemon: 6. DB::StorageDistributed::startup() @ 0x17841ea0 in /usr/bin/clickhouse
<Fatal> BaseDaemon: 7. ? @ 0x1715a672 in /usr/bin/clickhouse
<Fatal> BaseDaemon: 8. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0xff3df97 in /usr/bin/clickho

<Fatal> BaseDaemon: 9. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>
```
StorageDistributed & storage_,
    const DiskPtr & disk_,
    const std::string & relative_path_,
    ConnectionPoolPtr pool_,
    ActionBlocker & monitor_blocker_,
    BackgroundSchedulePool & bg_pool)
    : storage(storage_)
    , pool(std::move(pool_))
    , disk(disk_)
    , relative_path(relative_path_)
    , path(disk->getPath() + relative_path + '/')
    , should_batch_inserts(storage.global_context.getSettingsRef().distributed_directory_monitor_batch_inserts)
    , dir_fsync(storage.getDistributedSettingsRef().fsync_directories)
    , min_batched_block_size_rows(storage.global_context.getSettingsRef().min_insert_block_size_rows)
    , min_batched_block_size_bytes(storage.global_context.getSettingsRef().min_insert_block_size_bytes)
    , current_batch_file_path(path + "current_batch.txt")
    , default_sleep_time(storage.global_context.getSettingsRef().distributed_directory_monitor_sleep_time_ms.totalMilliseconds())
    , sleep_time(default_sleep_time)
    , max_sleep_time(storage.global_context.getSettingsRef().distributed_directory_monitor_max_sleep_time_ms.totalMilliseconds())
    , log(&Poco::Logger::get(getLoggerName()))
    , monitor_blocker(monitor_blocker_)
    , metric_pending_files(CurrentMetrics::DistributedFilesToInsert, 0)
{
    task_handle = bg_pool.createTask(getLoggerName() + "/Bg", [this]{ run(); });
    task_handle->activateAndSchedule();
}
StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor()