title: Distributed table deleting partition
body: <p>I have created replicated merge tree table as below:</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE probe.a on cluster dwh (
  instime UInt64,
  psn UInt64
  ) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/probe/a', '{replica}') PARTITION BY instime ORDER BY (psn);
  </code></pre>
  
  <p>Then I created a distributed table as :</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE probe.a_distributed on cluster dwh (
  instime UInt64,
  psn UInt64
  ) ENGINE = Distributed(dwh,probe, a, rand());
  </code></pre>
  
  <p>I have then added macro in each server:</p>
  
  <p><strong>Server 1</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;yandex&gt;
      &lt;macros replace="true"&gt;
          &lt;shard&gt;1&lt;/shard&gt;
          &lt;replica&gt;server1.com&lt;/replica&gt;
      &lt;/macros&gt;
  &lt;/yandex&gt;
  </code></pre>
  
  <p><strong>Server 2</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;yandex&gt;
      &lt;macros replace="true"&gt;
          &lt;shard&gt;2&lt;/shard&gt;
          &lt;replica&gt;server2.com&lt;/replica&gt;
      &lt;/macros&gt;
  &lt;/yandex&gt;
  </code></pre>
  
  <p><strong>Remote Servers:</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dwh&gt;
              &lt;!-- shard 01 --&gt;
              &lt;shard&gt;            
                  &lt;replica&gt;
                      &lt;host&gt;server1.com&lt;/host&gt;
                      &lt;port&gt;9000&lt;/port&gt;
                      &lt;user&gt;default&lt;/user&gt;
                      &lt;password&gt;test12pwd&lt;/password&gt;
                  &lt;/replica&gt;
              &lt;/shard&gt;
  
              &lt;!-- shard 02 --&gt;
              &lt;shard&gt;            
                  &lt;replica&gt;
                      &lt;host&gt;server2.com&lt;/host&gt;
                      &lt;port&gt;9000&lt;/port&gt;
                      &lt;user&gt;default&lt;/user&gt;
                      &lt;password&gt;test12pwd&lt;/password&gt;
                  &lt;/replica&gt;
              &lt;/shard&gt;
   &lt;/dwh&gt;
  </code></pre>
  
  <p><strong><em>I have two issues when dropping partition:</em></strong></p>
  
  <ol>
  <li><p>When I drop partition using a distributed table </p>
  
  <p>ALTER TABLE probe.a on cluster dwh DROP PARTITION '2020-03-13';</p></li>
  </ol>
  
  <p>I get error:</p>
  
  <blockquote>
    <p>DB::Exception: Table 'a' is replicated, but shard #4 isn't replicated
    according to its cluster definition. Possibly
    true is forgotten in the
    cluster config. (version 19.16.14.65) (version 19.16.14.65)</p>
  </blockquote>
  
  <ol start="2">
  <li>Dropped partition individually but distributed table is showing half of the row still but when I check locally there is no row
    <a href="https://i.stack.imgur.com/Y3bhC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y3bhC.png" alt="enter image description here"></a></li>
  </ol>
  
  <p><strong>How can this issue with distributed table be resolved for data sharded without replication?</strong></p>