Module: Aerospike::ResultCode

Defined in:
lib/aerospike/result_code.rb

Constant Summary collapse

BATCH_FAILED =

One or more keys failed in a batch.

-20
NO_RESPONSE =

No response was received from the server.

-19
NETWORK_ERROR =

A network error. Checked the wrapped error for detail.

-18
COMMON_ERROR =

A common, none-aerospike error. Checked the wrapped error for detail.

-17
MAX_RETRIES_EXCEEDED =

Max retries limit reached.

-16
MAX_ERROR_RATE =

Max errors limit reached.

-15
RACK_NOT_DEFINED =

Requested Rack for node/namespace was not defined in the cluster.

-13
INVALID_CLUSTER_PARTITION_MAP =

Cluster has an invalid partition map, usually due to bad configuration.

-12
SERVER_NOT_AVAILABLE =

Server is not accepting requests.

-11
CLUSTER_NAME_MISMATCH_ERROR =

Cluster Name does not match the ClientPolicy.ClusterName value.

-10
RECORDSET_CLOSED =

Recordset has already been closed or cancelled

-9
NO_AVAILABLE_CONNECTIONS_TO_NODE =

There were no connections available to the node in the pool, and the pool was limited

-8
TYPE_NOT_SUPPORTED =

Value type not supported by Aerospike server

-7
COMMAND_REJECTED =

Asynchronous max concurrent database commands have been exceeded and therefore rejected.

-6
QUERY_TERMINATED =

Query was terminated by user.

-5
SCAN_TERMINATED =

Scan was terminated by user.

-4
INVALID_NODE_ERROR =

Chosen node is not currently active.

-3
PARSE_ERROR =

Client parse error.

-2
SERIALIZE_ERROR =

Client serialization error.

-1
OK =

Operation was successful.

0
SERVER_ERROR =

Unknown server failure.

1
KEY_NOT_FOUND_ERROR =

On retrieving, touching or replacing a record that doesn’t exist.

2
GENERATION_ERROR =

On modifying a record with unexpected generation.

3
PARAMETER_ERROR =

Bad parameter(s) were passed in database operation call.

4
KEY_EXISTS_ERROR =

On create-only (write unique) operations on a record that already exists.

5
BIN_EXISTS_ERROR =

Bin already exists on a create-only operation.

6
CLUSTER_KEY_MISMATCH =

Expected cluster ID was not received.

7
SERVER_MEM_ERROR =

Server has run out of memory.

8
TIMEOUT =

Client or server has timed out.

9
NO_XDS =

XDS product is not available.

10
PARTITION_UNAVAILABLE =

Partition is unavailable.

11
BIN_TYPE_ERROR =

Operation is not supported with configured bin type (single-bin or multi-bin).

12
RECORD_TOO_BIG =

Record size exceeds limit.

13
KEY_BUSY =

Too many concurrent operations on the same record.

14
SCAN_ABORT =

Scan aborted by server.

15
UNSUPPORTED_FEATURE =

Unsupported Server Feature (e.g. Scan + UDF)

16
BIN_NOT_FOUND =

Bin not found on update-only operation.

17
DEVICE_OVERLOAD =

Specified bin name does not exist in record.

18
KEY_MISMATCH =

Key type mismatch.

19
INVALID_NAMESPACE =

Invalid namespace.

20
BIN_NAME_TOO_LONG =

Sent too-long bin name (>15, should be impossible in this client) or exceeded namespace’s bin name quota.

21
FAIL_FORBIDDEN =

Operation not allowed at this time.

22
ELEMENT_NOT_FOUND =

Returned by Map put and put_items operations when policy is REPLACE but key was not found

23
ELEMENT_EXISTS =

Returned by Map put and put_items operations when policy is CREATE_ONLY but key already exists

24
ENTERPRISE_ONLY =

Enterprise-only feature not supported by the community edition

25
OP_NOT_APPLICABLE =

The operation cannot be applied to the current bin value on the server.

26
FILTERED_OUT =

The transaction was not performed because the predexp was false.

27
LOST_CONFLICT =

Write command loses conflict to XDR.

28
QUERY_END =

There are no more records left for query.

50
SECURITY_NOT_SUPPORTED =

Security functionality not supported by connected server.

51
SECURITY_NOT_ENABLED =

Security functionality not enabled by connected server.

52
SECURITY_SCHEME_NOT_SUPPORTED =

Security scheme not supported.

53
INVALID_COMMAND =

Administration command is invalid.

54
INVALID_FIELD =

Administration field is invalid.

55
ILLEGAL_STATE =
56
INVALID_USER =

User name is invalid.

60
USER_ALREADY_EXISTS =

User was previously created.

61
INVALID_PASSWORD =

Password is invalid.

62
EXPIRED_PASSWORD =

Password is invalid.

63
FORBIDDEN_PASSWORD =

Password is invalid.

64
INVALID_CREDENTIAL =

Security credential is invalid.

65
EXPIRED_SESSION =

Expired session token.

66
INVALID_ROLE =

Role name is invalid.

70
ROLE_ALREADY_EXISTS =

Role Already exists

71
INVALID_PRIVILEGE =

Privilege is invalid.

72
INVALID_WHITELIST =

Specified IP allowlist is invalid.

73
NOT_AUTHENTICATED =

User must be authentication before performing database operations.

80
ROLE_VIOLATION =

User does not posses the required role to perform the database operation.

81
NOT_WHITELISTED =

Client IP address is not on the IP allowlist.

82
LDAP_NOT_ENABLED =

LDAP feature not enabled on server.

90
LDAP_SETUP =

Error in LDAP setup.

91
LDAP_TLS_SETUP =

Error in LDAP TLS setup.

92
LDAP_AUTHENTICATION =

Error authenticating LDAP user.

93
LDAP_QUERY =

Error querying LDAP server.

94
UDF_BAD_RESPONSE =

A user defined function returned an error code.

100
BATCH_DISABLED =

Batch functionality has been disabled by configuring the batch-index-thread=0.

150
BATCH_MAX_REQUESTS =

Batch max requests has been exceeded.

151
BATCH_QUEUES_FULL =

All batch queues are full.

152
INVALID_GEOJSON =

GeoJSON is malformed or not supported.

160
INDEX_FOUND =

Secondary index already exists.

200
INDEX_NOTFOUND =

Requested secondary index does not exist.

201
INDEX_OOM =

Secondary index memory space exceeded.

202
INDEX_NOTREADABLE =

Secondary index not available.

203
INDEX_GENERIC =

Generic secondary index error.

204
INDEX_NAME_MAXLEN =

Index name maximum length exceeded.

205
INDEX_MAXCOUNT =

Maximum number of indicies exceeded.

206
QUERY_ABORTED =

Secondary index query aborted.

210
QUERY_QUEUEFULL =

Secondary index queue full.

211
QUERY_TIMEOUT =

Secondary index query timed out on server.

212
QUERY_GENERIC =

Generic query error.

213
QUERY_NET_IO =

Network error. Query is aborted.

214
QUERY_DUPLICATE =

Internal error.

215

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



21
22
23
# File 'lib/aerospike/result_code.rb', line 21

def code
  @code
end

Class Method Details

.message(code) ⇒ Object



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/aerospike/result_code.rb', line 302

def self.message(code)
  case code
  when BATCH_FAILED
      "one or more keys failed in a batch"

  when NO_RESPONSE
      "no response was received from the server"

  when NETWORK_ERROR
      "network error. Checked the wrapped error for detail"

  when COMMON_ERROR
      "common, none-aerospike error. Checked the wrapped error for detail"

  when MAX_RETRIES_EXCEEDED
      "Max retries exceeded"

  when MAX_ERROR_RATE
      "Max errors limit reached for node"

  when RACK_NOT_DEFINED
      "Requested Rack for node/namespace was not defined in the cluster."

  when INVALID_CLUSTER_PARTITION_MAP
      "Cluster has an invalid partition map, usually due to bad configuration."

  when SERVER_NOT_AVAILABLE
      "Server is not accepting requests."

  when CLUSTER_NAME_MISMATCH_ERROR
      "Cluster Name does not match the ClientPolicy.ClusterName value"

  when RECORDSET_CLOSED
      "Recordset has already been closed or cancelled."

  when NO_AVAILABLE_CONNECTIONS_TO_NODE
      "No available connections to the node. Connection Pool was empty, and limited to certain number of connections."

  when TYPE_NOT_SUPPORTED
      "Type cannot be converted to Value Type."

  when COMMAND_REJECTED
    "Command rejected"

  when QUERY_TERMINATED
    "Query terminated"

  when SCAN_TERMINATED
    "Scan terminated"

  when INVALID_NODE_ERROR
    "Invalid node"

  when PARSE_ERROR
    "Parse error"

  when SERIALIZE_ERROR
    "Serialize error"

  when OK
    "ok"

  when SERVER_ERROR
    "Server error"

  when KEY_NOT_FOUND_ERROR
    "Key not found"

  when GENERATION_ERROR
    "Generation error"

  when PARAMETER_ERROR
    "Parameter error"

  when KEY_EXISTS_ERROR
    "Key already exists"

  when BIN_EXISTS_ERROR
    "Bin already exists on a create-only operation"

  when CLUSTER_KEY_MISMATCH
    "Cluster key mismatch"

  when SERVER_MEM_ERROR
    "Server memory error"

  when TIMEOUT
    "Timeout"

  when NO_XDS
    "XDS not available"

  when PARTITION_UNAVAILABLE
      "Partition not available"

  when BIN_TYPE_ERROR
    "Bin type error"

  when RECORD_TOO_BIG
    "Record too big"

  when KEY_BUSY
    "Hot key"

  when SCAN_ABORT
    "Scan aborted"

  when UNSUPPORTED_FEATURE
    "Unsupported Server Feature"

  when BIN_NOT_FOUND
    "Bin not found on update-only operation"

  when DEVICE_OVERLOAD
    "Device overload"

  when KEY_MISMATCH
    "Key mismatch"

  when INVALID_NAMESPACE
    "Invalid namespace"

  when BIN_NAME_TOO_LONG
    "Sent too-long bin name or exceeded namespace's bin name quota."

  when FAIL_FORBIDDEN
    "Operation not allowed at this time"

  when ELEMENT_NOT_FOUND
    "Element not found"

  when ELEMENT_EXISTS
    "Element already exists"

  when ENTERPRISE_ONLY
    "Enterprise-only feature not supported by community edition"

  when OP_NOT_APPLICABLE
    "The operation cannot be applied to the current bin value on the server."

  when FILTERED_OUT
    "The transaction was not performed because the predexp was false."

  when LOST_CONFLICT
    "Write command loses conflict to XDR."

  when QUERY_END
    "Query end"

  when SECURITY_NOT_SUPPORTED
    "Security not supported"

  when SECURITY_NOT_ENABLED
    "Security not enabled"

  when SECURITY_SCHEME_NOT_SUPPORTED
    "Security scheme not supported"

  when INVALID_COMMAND
    "Invalid command"

  when INVALID_FIELD
    "Invalid field"

  when ILLEGAL_STATE
    "Illegal state"

  when INVALID_USER
    "Invalid user"

  when USER_ALREADY_EXISTS
    "User already exists"

  when INVALID_PASSWORD
    "Invalid password"

  when EXPIRED_PASSWORD
    "Expired password"

  when FORBIDDEN_PASSWORD
    "Forbidden password"

  when INVALID_CREDENTIAL
    "Invalid credential"

  when EXPIRED_SESSION
    "Expired session token"

  when INVALID_ROLE
    "Invalid role"

  when ROLE_ALREADY_EXISTS
    "Role already exists"

  when INVALID_PRIVILEGE
    "Invalid privilege"

  when INVALID_WHITELIST
    "Specified IP allowlist is invalid"

  when NOT_AUTHENTICATED
    "Not authenticated"

  when ROLE_VIOLATION
    "Role violation"

  when NOT_WHITELISTED
    "Client IP address is not on the IP allowlist"

  when LDAP_NOT_ENABLED
    "LDAP feature not enabled on server"

  when LDAP_SETUP
    "Error in LDAP setup"

  when LDAP_TLS_SETUP
    "Error in LDAP TLS setup"

  when LDAP_AUTHENTICATION
    "Error authenticating LDAP user"

  when LDAP_QUERY
    "Error querying LDAP server"

  when UDF_BAD_RESPONSE
    "UDF d error"

  when BATCH_DISABLED
    "Batch functionality has been disabled by configuring the batch-index-thread=0"

  when BATCH_MAX_REQUESTS
    "Batch max requests has been exceeded"

  when BATCH_QUEUES_FULL
    "All batch queues are full"

  when INVALID_GEOJSON
    "GeoJSON is malformed or not supported"

  when INDEX_FOUND
    "Index already exists"

  when INDEX_NOTFOUND
    "Index not found"

  when INDEX_OOM
    "Index out of memory"

  when INDEX_NOTREADABLE
    "Index not readable"

  when INDEX_GENERIC
    "Index error - check server logs"

  when INDEX_NAME_MAXLEN
    "Index name max length exceeded"

  when INDEX_MAXCOUNT
    "Index count exceeds max"

  when QUERY_ABORTED
    "Query aborted"

  when QUERY_QUEUEFULL
    "Query queue full"

  when QUERY_TIMEOUT
    "Query timeout"

  when QUERY_GENERIC
    "Query error"

  when QUERY_NET_IO
    "Network error. Query is aborted"

  when QUERY_DUPLICATE
    "Internal query error"

  else
    "ResultCode #{code} unknown in the client. Please file a github issue."
  end # case

end