forked from docs/doc-exports
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
23 lines
4.9 KiB
HTML
23 lines
4.9 KiB
HTML
<a name="dcs-pd-200813004"></a><a name="dcs-pd-200813004"></a>
|
|
|
|
<h1 class="topictitle1">Other Command Usage Restrictions</h1>
|
|
<div id="body1600245575470"><p id="dcs-pd-200813004__p379444414312">This section describes restrictions on some Redis commands.</p>
|
|
<div class="section" id="dcs-pd-200813004__section1567172314449"><h4 class="sectiontitle">KEYS Command</h4><p id="dcs-pd-200813004__p14988194214420">In case of a large amount of cached data, running the <strong id="dcs-pd-200813004__b148464547175717">KEYS</strong> command may block the execution of other commands for a long time or occupy exceptionally large memory. Therefore, when running the <strong id="dcs-pd-200813004__b139142604575717">KEYS</strong> command, describe the exact pattern and do not use fuzzy <strong id="dcs-pd-200813004__b103570801675717">keys *</strong>. Do not use the <strong id="dcs-pd-200813004__b38229991775717">KEYS</strong> command in the production environment. Otherwise, the service running will be affected.</p>
|
|
</div>
|
|
<div class="section" id="dcs-pd-200813004__section0588144617440"><h4 class="sectiontitle">Commands in the Server Group</h4><ul id="dcs-pd-200813004__ul78861714154510"><li id="dcs-pd-200813004__li48861142456">While running commands that take a long time to run, such as <strong id="dcs-pd-200813004__b114472919475717">FLUSHALL</strong>, DCS instances may not respond to other commands and may change to the faulty state. After the command finishes executing, the instance will return to normal.</li><li id="dcs-pd-200813004__li1588691424516">When the <strong id="dcs-pd-200813004__b158190803875717">FLUSHDB</strong> or <strong id="dcs-pd-200813004__b86744379875717">FLUSHALL</strong> command is run, execution of other service commands may be blocked for a long time in case of a large amount of cached data.</li></ul>
|
|
</div>
|
|
<div class="section" id="dcs-pd-200813004__section1071724134515"><h4 class="sectiontitle">EVAL and EVALSHA Commands</h4><ul id="dcs-pd-200813004__ul1914511468452"><li id="dcs-pd-200813004__li161451846184514">When the <strong id="dcs-pd-200813004__b88442504575717">EVAL</strong> or <strong id="dcs-pd-200813004__b143284181675717">EVALSHA</strong> command is run, at least one key must be contained in the command parameter. Otherwise, the error message "ERR eval/evalsha numkeys must be bigger than zero in redis cluster mode" is displayed.</li><li id="dcs-pd-200813004__li91451246114513">When the <strong id="dcs-pd-200813004__b6323738075717">EVAL</strong> or <strong id="dcs-pd-200813004__b20252647175717">EVALSHA</strong> command is run, a cluster DCS Redis instance uses the first key to compute slots. Ensure that the keys to be operated in your code are in the same slot. For details, visit <a href="https://redis.io/commands" target="_blank" rel="noopener noreferrer">https://redis.io/commands</a>.</li><li id="dcs-pd-200813004__li17146134684513">For the <strong id="dcs-pd-200813004__b156441818975717">EVAL</strong> command:<ul id="dcs-pd-200813004__ul11146346104517"><li id="dcs-pd-200813004__li12146546194512">You are advised to learn the Lua script features of Redis before running the <strong id="dcs-pd-200813004__b51532644175717">EVAL</strong> command. For details, see <a href="https://redis.io/commands/eval" target="_blank" rel="noopener noreferrer">https://redis.io/commands/eval</a>.</li><li id="dcs-pd-200813004__li8146114619453">The execution timeout time of a Lua script is 5 seconds. Time-consuming statements such as long-time sleep and large loop statements should be avoided.</li><li id="dcs-pd-200813004__li1414684634512">When calling a Lua script, do not use random functions to specify keys. Otherwise, the execution results are inconsistent on the master and standby nodes.</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dcs-pd-200813004__section1883797104416"><h4 class="sectiontitle">Debugging Lua Scripts</h4><p id="dcs-pd-200813004__p1169313094518">When you debug Lua scripts for Proxy Cluster and read/write splitting instances, only the asynchronous non-blocking mode <strong id="dcs-pd-200813004__b101781911104015">--ldb</strong> is supported. The synchronous blocking mode <strong id="dcs-pd-200813004__b0178191118409">--ldb-sync-mode</strong> is not supported. By default, the maximum concurrency on each proxy is <strong id="dcs-pd-200813004__b15586191514015">2</strong>. This restriction does not apply to other instance types.</p>
|
|
</div>
|
|
<div class="section" id="dcs-pd-200813004__section17333752164515"><h4 class="sectiontitle">Other Restrictions</h4><ul id="dcs-pd-200813004__ul487712135467"><li id="dcs-pd-200813004__li2877113174613">The time limit for executing a Redis command is 15 seconds. To prevent other services from failing, a master/replica switchover will be triggered after the command execution times out.</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-pd-200312003.html">Command Compatibility</a></div>
|
|
</div>
|
|
</div>
|
|
|