{"record":{"id":"c24c205968e5b466","repo":"apache/cassandra","slug":"invalid-pair-s","errorCode":null,"errorMessage":"Invalid pair: '%s'","messagePattern":"Invalid pair: '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java","lineNumber":406,"sourceCode":"\n        /**\n         * Creates filter for entities to replay mutations for upon commit log replay.\n         *\n         * @see org.apache.cassandra.config.CassandraRelevantProperties#COMMIT_LOG_REPLAY_LIST\n         * */\n        public static ReplayFilter create()\n        {\n            String replayList = COMMIT_LOG_REPLAY_LIST.getString();\n\n            if (replayList == null)\n                return new AlwaysReplayFilter();\n\n            Multimap<String, String> toReplay = HashMultimap.create();\n            for (String rawPair : replayList.split(\",\"))\n            {\n                String trimmedRawPair = rawPair.trim();\n                if (trimmedRawPair.isEmpty() || trimmedRawPair.endsWith(\".\"))\n                    throw new IllegalArgumentException(format(\"Invalid pair: '%s'\", trimmedRawPair));\n\n                String[] pair = StringUtils.split(trimmedRawPair, '.');\n\n                if (pair.length > 2)\n                    throw new IllegalArgumentException(format(\"%s property contains an item which \" +\n                                                              \"is not in format 'keyspace' or 'keyspace.table' \" +\n                                                              \"but it is '%s'\",\n                                                              COMMIT_LOG_REPLAY_LIST.getKey(),\n                                                              String.join(\".\", pair)));\n\n                String keyspaceName = pair[0];\n\n                Keyspace ks = Schema.instance.getKeyspaceInstance(keyspaceName);\n                if (ks == null)\n                    throw new IllegalArgumentException(\"Unknown keyspace \" + keyspaceName);\n\n                if (pair.length == 1)\n                {","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L388-L424","documentation":"CommitLogReplayer.create parses the cassandra.commitlog_replay_list property (replayList) into a keyspace/table multimap. Each comma-separated entry is trimmed; if an entry is empty or ends with a dot (implying a missing table), an IllegalArgumentException 'Invalid pair: <entry>' is thrown before replay begins.","triggerScenarios":"Starting a node with -Dcassandra.commitlog_replay_list=KS1., or ',KS1', or double commas — i.e. any comma-separated item that is blank or ends in '.'.","commonSituations":"Hand-editing the replay list with trailing commas or a trailing dot after a keyspace name, script-generated option strings with empty entries, or copy/paste errors in operational runbooks.","solutions":["Remove trailing commas and trailing dots from the cassandra.commitlog_replay_list value.","Ensure each entry is exactly 'keyspace' or 'keyspace.table', e.g. 'ks1,ks2.tbl1'.","If replaying everything, unset cassandra.commitlog_replay_list instead of passing an empty item.","Validate the list programmatically before restart: split on ',', trim, and assert no empty or dot-terminated entries."],"exampleFix":"// before\n-Dcassandra.commitlog_replay_list=ks1.,ks2   // IllegalArgumentException: Invalid pair: 'ks1.'\n// after\n-Dcassandra.commitlog_replay_list=ks1,ks2","handlingStrategy":"validation","validationCode":"for (String item : replayList.split(\",\")) {\n    String t = item.trim();\n    if (t.isEmpty() || t.endsWith(\".\"))\n        throw new IllegalArgumentException(\"Bad replay list item: '\" + t + \"'\");\n}","typeGuard":null,"tryCatchPattern":"try { CommitLogReplayer.create(...); } catch (IllegalArgumentException e) { logger.error(\"Bad commitlog_replay_list: {}\", e.getMessage()); }","preventionTips":["Never leave trailing commas or trailing dots in the replay list","Generate the list programmatically from schema metadata","Test the property value on a staging node before production restart"],"tags":["commitlog","replay","configuration","parsing"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}