**Describe the bug**
When the requests are done in a very specific environment, they got an error from ClickHouse. The partially it was fixed in https://github.com/ClickHouse/ClickHouse/pull/21936

**Does it reproduce on recent release?**
It's reproducible with docker image `yandex/clickhouse-server:latest` having digest `sha256:d359e6cff39486d2563cd16a307e0981ea6150760d7589b35e0e76ee7ba889ce`

**How to reproduce**
The very precise case for reproduction is present in https://github.com/Felixoid/ch-forms-issue

**Expected behavior**
The requests should work
}
        else
        {
            if (peeked_size)
                throw DB::Exception("Own buffer is not empty", ErrorCodes::LOGICAL_ERROR);
            if (currentlyReadFromOwnMemory())
                throw DB::Exception("Current position in own buffer before checkpoint in subbuffer", ErrorCodes::LOGICAL_ERROR);
            if (pos < *checkpoint)
                throw DB::Exception("Current position in subbuffer before checkpoint in subbuffer", ErrorCodes::LOGICAL_ERROR);
        }
    }
    else
    {
        if (!currentlyReadFromOwnMemory() && peeked_size)
            throw DB::Exception("Own buffer is not empty", ErrorCodes::LOGICAL_ERROR);
    }
    if (currentlyReadFromOwnMemory() && !peeked_size)
        throw DB::Exception("Pos in empty own buffer", ErrorCodes::LOGICAL_ERROR);
}
void PeekableReadBuffer::resizeOwnMemoryIfNecessary(size_t bytes_to_append)
{
    checkStateCorrect();
    bool need_update_checkpoint = checkpointInOwnMemory();
    bool need_update_pos = currentlyReadFromOwnMemory();
    size_t offset = 0;
    if (need_update_checkpoint)
        offset = *checkpoint - memory.data();
    else if (need_update_pos)
        offset = this->offset();
    size_t new_size = peeked_size + bytes_to_append;