我们遇到了使用辅助密钥丢失记录的问题。一组用户包含以下容器:名称,电子邮件,密码,角色和 private_token - 在bin 上有一个辅助密钥private_token
关于这个问题: 截至上周,Google Cloud中有四个节点。用户集的二级密钥工作正常。 在上周末,我们创建了一个新节点,现在这个特定的集合在使用辅助密钥查询时停止返回任何数据。关于具有类似配置的所有其他集合,它们保持返回正确的值。
用户集的命名空间n1正在使用非本地SSD存储。
为了解决这个问题,我们创建了一个新的命名空间,即 test ,它存储在内存中。 这是一个在n1命名空间中失败但在测试命名空间中成功的脚本:
INSERT INTO test.user (PK, name, email, password, role, private_token) VALUES ('test@test.com', 'Test 1', 'test@test.com', 'password_test_1', 'role_test_1', 'private_token_1')
INSERT INTO test.user (PK, name, email, password, role, private_token) VALUES ('test2@test.com', 'Test 2', 'test2@test.com', 'password_test_2', 'role_test_2', 'private_token_2')
CREATE INDEX user_private_token ON test.user(private_token) STRING
SELECT * FROM test.user WHERE private_token = 'private_token_2'
以下是测试命名空间中的输出:
+----------+------------------+-------------------+---------------+-------------------+
| name | email | password | role | private_token |
+----------+------------------+-------------------+---------------+-------------------+
| "Test 2" | "test2@test.com" | "password_test_2" | "role_test_2" | "private_token_2" |
+----------+------------------+-------------------+---------------+-------------------+
1 row in set (0.001 secs)
这里是n1名称空间:
0 rows in set (0.001 secs)
airospike版本:
$ dpkg -l | grep aerospike
ii aerospike-amc-community 3.6.4 all AMC Community Version is a web UI based monitoring tool for Aerospike Community Edition Server releases after 2.6.3 (March 2013)
ii aerospike-server-community 3.6.4-1 amd64 The Aerospike distributed datastore allows fully scalable and reliable data storage with elastic server properties.
ii aerospike-tools 3.6.3 amd64 Aerospike server tools.
尝试在asadm中进行故障排除:
$ asadm
Aerospike Interactive Shell, version 0.0.13
Found 6 nodes
Online: 10.240.0.3:3000, 10.240.0.4:3000, 10.240.0.5:3000, 10.240.0.2:3000, 10.240.0.6:3000
Offline: 10.240.0.9:3000
Admin> info network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Network Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Node Node Fqdn Ip Client Current HB HB
. Id . . Conns Time Self Foreign
10.240.0.9 000000000000000 10.240.0.9:3000 10.240.0.9:3000 N/E N/E N/E N/E
aerospike-vm-1 BB90300F00A0142 aerospike-vm-1.c.citiservi-ads.internal:3000 10.240.0.3:3000 38 193339236 0 249014840
aerospike-vm-2 BB90500F00A0142 aerospike-vm-2.c.citiservi-ads.internal:3000 10.240.0.5:3000 37 193339236 0 194991137
aerospike-vm-3 BB90400F00A0142 aerospike-vm-3.c.citiservi-ads.internal:3000 10.240.0.4:3000 34 193339236 0 229395269
aerospike-vm-4 BB90200F00A0142 aerospike-vm-4.c.citiservi-ads.internal:3000 10.240.0.2:3000 45 193339236 0 224245394
aerospike-vm-5 *BB90600F00A0142 aerospike-vm-5.c.citiservi-ads.internal:3000 10.240.0.6:3000 37 193339236 0 17162917
Number of rows: 6
Admin> info service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Service Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Node Build Cluster Cluster Cluster Free Free Migrates Principal Objects Uptime
. . Size Visibility Integrity Disk% Mem% (tx,rx,q) . . .
10.240.0.9 N/E N/E N/E N/E N/E N/E N/E N/E N/E N/E
aerospike-vm-1 3.6.4 5 True True 61 68 (0,0,0) aerospike-vm-5 58.618 M 1710:56:06
aerospike-vm-2 3.6.4 5 True True 61 69 (0,0,0) aerospike-vm-5 57.594 M 1472:30:21
aerospike-vm-3 3.6.4 5 True True 61 68 (0,0,0) aerospike-vm-5 57.430 M 1638:33:39
aerospike-vm-4 3.6.4 5 True True 61 68 (0,0,0) aerospike-vm-5 58.242 M 1824:25:55
aerospike-vm-5 3.6.4 5 True True 61 71 (0,0,0) aerospike-vm-5 57.774 M 102:48:57
Number of rows: 6
Admin> info sindex
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/asadm/__main__.py", line 20, in <module>
File "/usr/bin/asadm/asadm.py", line 339, in main
File "/usr/lib/python2.7/cmd.py", line 141, in cmdloop
line = self.precmd(line)
File "/usr/bin/asadm/asadm.py", line 108, in precmd
File "/usr/bin/asadm/lib/controllerlib.py", line 176, in execute
File "/usr/bin/asadm/lib/controllerlib.py", line 120, in __call__
File "/usr/bin/asadm/lib/controllerlib.py", line 176, in execute
File "/usr/bin/asadm/lib/controller.py", line 158, in do_sindex
TypeError: string indices must be integers, not str
如何修复设置并再次使用工作索引?
提前致谢
答案 0 :(得分:0)
不太可能仍然存在问题,但操作手册的Managing Indexes文章提供了有关如何修复索引的信息。自引用版本3.6以来,二级索引上也有很多work done。