• Binbin's avatar
    Fix CLUSTER SHARDS showing empty hostname (#11297) · 1de675b3
    Binbin authored
    * Fix CLUSTER SHARDS showing empty hostname
    
    In #10290, we changed clusterNode hostname from `char*`
    to `sds`, and the old `node->hostname` was changed to
    `sdslen(node->hostname)!=0`.
    
    But in `addNodeDetailsToShardReply` it is missing.
    It results in the return of an empty string hostname
    in CLUSTER SHARDS command if it unavailable.
    
    Like this (note that we listed it as optional in the doc):
    ```
     9) "hostname"
    10) ""
    ```
    1de675b3
cluster.c 281 KB