mirror of
https://github.com/predis/predis.git
synced 2026-09-28 16:08:29 +00:00
Added experimental support for HIMPORT bulk hash import feature (#1712)
* Added support for HIMPORT bulk hash import feature * Fixed pre-server execution registry miutating, added pre-loaded registry feature * Refactored retry logic to use existing configuration * Marked feature as experimental * Remvoed non-ASCII chars * Ensure IteratorAggregator interface is enforced * Fixed bug with updateCachableException adds duplicate entries * Added explicit reconnect for Relay tests * Testing with custom image * Removed redundant comment * Fixed exception handling * Removed non-ASCII char * Fixed merged conflict bugs
This commit is contained in:
committed by
GitHub
parent
0bf4ba1c9f
commit
ac3142abfe
@@ -360,6 +360,29 @@ class RedisStrategyTest extends PredisTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testKeysForHimportCommand(): void
|
||||
{
|
||||
$strategy = $this->getClusterStrategy();
|
||||
$commands = $this->getCommandFactory();
|
||||
|
||||
// HIMPORT SET is routed by the hash slot of its key (at position 1).
|
||||
$command = $commands->create('HIMPORT', ['SET', '{key}:1', 'fieldset', 'v1', 'v2']);
|
||||
$this->assertNotNull($strategy->getSlot($command));
|
||||
|
||||
// PREPARE/DISCARD/DISCARDALL have no key and are not slot-routable.
|
||||
$command = $commands->create('HIMPORT', ['PREPARE', 'fieldset', 'f1', 'f2']);
|
||||
$this->assertNull($strategy->getSlot($command));
|
||||
|
||||
$command = $commands->create('HIMPORT', ['DISCARD', 'fieldset']);
|
||||
$this->assertNull($strategy->getSlot($command));
|
||||
|
||||
$command = $commands->create('HIMPORT', ['DISCARDALL']);
|
||||
$this->assertNull($strategy->getSlot($command));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
@@ -736,6 +759,7 @@ class RedisStrategyTest extends PredisTestCase
|
||||
'HVALS' => 'keys-first',
|
||||
'HSCAN' => 'keys-first',
|
||||
'HSTRLEN' => 'keys-first',
|
||||
'HIMPORT' => 'keys-himport',
|
||||
'HEXPIRE' => 'keys-hash-field',
|
||||
'HEXPIREAT' => 'keys-hash-field',
|
||||
'HPERSIST' => 'keys-hash-field',
|
||||
|
||||
Reference in New Issue
Block a user