-
Notifications
You must be signed in to change notification settings - Fork 0
Source main #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source main #1
Conversation
* DOC-4758 added landing page examples * DOC-4758 added Path page examples * DOC-4758 work around arrAppend issue * DOC-4758 applied formatting
* Add support for 8.2 stream commands - Add support for XDELEX and XACKDEL - Extend XADD and XTRIM to support trimming policy * Add @SInCE tags * Update NodeSelection API * Add StreamEntryDeletionResult.UNKNOWN to avoid throwing exceptions * Clean up RedisCommandBuilder - Remove redundant code blocks - Use CommandKeyword for IDS - Add unit tests * Fix broken test
* test: remove redundant assertions and clarify time-related values with constants * test: remove redundant assertions and clarify time-related values with constants * test: remove redundant assertions and clarify time-related values with constants
* RediSearch support (part 1 of 3) (redis#3325) * Revert "Revert "Add support for FT.CREATE redis#2717 (redis#3150)" (redis#3160)" (redis#3161) This reverts commit 319e315. * Add support for FT.DROPINDEX redis#2722 (redis#3164) * Add support for FT.DROPINDEX redis#2722 * Polishing * FT.SEARCH added Vibe code the FT.SEARCH command Pulled latest from the integration branch Fixed a lot of the hallucinations RESP2 parser improvements JSON Indexing tests Add some advanced use-cases Fixed all integration tests Fixed schema fields, added vector tests, but they are all failing Fixed vector search tests Improve coverage of integration and unit tests One unit test fails * API cleanup, added Kotlin implementation * Implement the FT.AGGREGATE command Fixing the integration tests for FT.AGGREGATE Polishing 1/3 Add more documentation ot the AggregateArgs * Implement the FT.CURSOR command Add Integration tests for the FT.CURSOR Add RESP2 tests for all aggragation integration tests * FT.AGGREGATE was never working in the first place, now it is working, but for RESP3 only * Fixing unit tests (part1) Fixing unit tests (part2) Fixing unit tests (part3) * Polishing (part 1) * RediSearch support (part 2 of 3) (redis#3360) Introducing the FT.ALTER Introducing the FT.ALIASADD, FT.ALIASUPDATE, FT.ALIASDEL Introducing the FT.TAGVALS * RediSearch support (part 3 of 3) (redis#3364) * Introducing the FT.SUGADD FT.SUGDEL FT.SUGGET and FT.SUGLEN * Introducing the FT.DICTADD, FT.DICTDEL, FT.DICTDUMP * Introducing the FT.SPELLCHECK * Introducing the FT.SPELLCHECK (polishing) * Introducing the FT.EXPLAIN, FT.SYNUPDATE, FT.SYNDUMP, FT._LIST * Introducing the FT.PROFILE Polishing 1 Polishing 1 * Polishing 2 * Removing the FT.PROFILE command entirely * Polishing 3 * Polishing 4 * RediSearch with Lettuce - final fixes (redis#3371) * Fix wrong aggregation arguments order Docs part (to squash later) Modified CreateArgs and SearchArgs Address review comments 1/many Addressed review comment by Igor, more polishing * Cluster tests * Extend wordlist * Extend wordlist 2 * Avoid NPE when empty result received * Avoid NPE when empty result received 2 * Disable cluster tests for 7.2 and 7.4
* Provide support for the SVS-VMANA index * Enable VAMANA tests for Redis 8.2+
* reuse-objectmapper-defaultjsonparser Refactor DefaultJsonParser to use a single static ObjectMapper instance instead of creating new instances for each method call, improving performance and memory usage. * Allow injection of custom ObjectMapper in DefaultJsonParser * Add JavaDoc --------- Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
* Releasing 6.8.0.RELEASE * Expanding the evergrowing wordlist * Expanding the evergrowing wordlist 2
…re (redis#3328) (redis#3346) * chore: remove deprecated ClientOptions#cancelCommandsOnReconnectFailure - removed the option from ClientOptions and ClusterClientOptions and related builders - removed usages from integration tests and unit tests - removed usage from ReconnectionHandler and DefaultEndpoint Signed-off-by: The-East-Wind <hariatul1998@gmail.com> * Also remove the documentation on the cancelCommandsOnReconnectFailure option --------- Signed-off-by: The-East-Wind <hariatul1998@gmail.com> Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
…dis#3328) (redis#3344) * chore: remove deprecated AbstractRedisClient#getDefaultTimeout - remove usages from RedisClient and replaced with timeout value from redisUri - fixed failing tests in RedisClientConnectIntegrationTests by asserting timeout to be equal to default timeout from RedisURI - refactored DefaultRedisClient test fixture to not set timeout Signed-off-by: The-East-Wind <hariatul1998@gmail.com> * chore: remove deprecated default timeout from AbstractRedisClient - refactor AtLeastOnce and AtMostOnce IntegrationTests to remove setting timeout on the client level and instead set it in the URI level - removed default timeout and usages which set it from AbstractRedisClient, RedisClient and RedisClusterClient Signed-off-by: The-East-Wind <hariatul1998@gmail.com> * docs: update relevant documentation to remove usage of RedisClient#setDefaultTimeout Signed-off-by: The-East-Wind <hariatul1998@gmail.com> --------- Signed-off-by: The-East-Wind <hariatul1998@gmail.com>
* Remove deprecated withPassword(String) method * Completely remove all deprecated logic in the RedisURI class --------- Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
* Enable adaptive refresh by default redis#3249 * Added @SInCE * Fix integration test [incomplete] * Add also fix to issue 3250 * Change default to 5 seconds * Remove unnecessary new line
…edis#3279) * Using non-native transports with SocketOptions should cause an error * Add LettuceAssert.assertState Revert previous implement
* Bump kotlin.version from 1.7.21 to 1.9.25 Bumps `kotlin.version` from 1.7.21 to 1.9.25. Updates `org.jetbrains.kotlin:kotlin-bom` from 1.7.21 to 1.9.25 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.25/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.21...v1.9.25) Updates `org.jetbrains.kotlin:kotlin-maven-plugin` from 1.7.21 to 1.9.25 --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-bom dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Minimum language and api level is now 1.4 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
…edis#3266) - Changed constructor to private to prevent instantiation
* Update redis-search.md dialect_2=> dialect2, CreateArgs.TargetType.HASH instead of IndexDataType.HASH * Polishing + added some more information on query dialects --------- Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
…dis#3449) * Add support for EPSILON and WITHATTRIBS arguments in VSIM * Fix integration test to require min redis 8.0 * Fix API doc * Rm since in response --------- Co-authored-by: aleksandar.todorov <a_t_todorov@yahoo.com>
…rties (redis#3450) * Rename MaintenanceEventsOptions to MaintNotificationsConfig Rename configuration class and properties for maintenance notifications: - MaintenanceEventsOptions → MaintNotificationsConfig - supportMaintenanceEvents() → enableMaintNotifications() - supportsMaintenanceEvents() → maintNotificationsEnabled() - getMaintenanceEventsOptions() → getMaintNotificationsConfig() Updates all references across codebase and tests. * Rename AddressType to EndpointType in maintenance notifications Rename maintenance notification address types to endpoint types: - AddressType → EndpointType enum - AddressTypeSource → EndpointTypeSource class - getAddressType() → getEndpointType() method - fixedAddressType() → endpointType() builder method - autoResolveAddressType() → autoResolveEndpointType() method * Fix relaxedTimeouts API doc * format * remove duplicated TypeType from method name * rename timeoutsRelaxingDuringMaintenance to relaxedTimeoutsDuringMaintenance
- update RELEASE-NOTES.md
* Release Lettuce 7.0.0.BETA2 - update RELEASE-NOTES.md * update RELEASE-NOTES.md - update hitless upgrade to `Maintenance events support` * update RELEASE-NOTES.md * fix spellcheck
* Upgrading to Netty 4.2 * Fix issues with native transports
* Make search readonly commands keyless * Make cursor keyless * Fix AggregateArgs to remove key * Make ftCreate, ftAlias, ftAlter, ftDropindex keyless * Fix ftCreate javadoc
…redis#3461) * feat(CAE-1130): Add comprehensive connection testing for Redis Enterprise maintenance events - Add ConnectionTesting class with 9 test scenarios for maintenance handoff behavior - Test old connection graceful shutdown during MOVING operations - Validate traffic resumption with autoconnect after handoff - Verify maintenance notifications only work with RESP3 protocol - Test new connection establishment during migration and bind phases - Add memory leak validation for multiple concurrent connections - Include TLS support testing for maintenance events - Replace .supportMaintenanceEvents(true) with MaintenanceEventsOptions.enabled() - Add comprehensive monitoring and validation of connection lifecycle Tests cover CAE-1130 requirements for Redis Enterprise maintenance event handling including connection draining, autoconnect behavior, and notification delivery. * Add comprehensive maintenance events tests for CLIENT MAINT_NOTIFICATIONS - connectionHandshakeIncludesEnablingNotificationsTest: Verifies all 5 notification types (MOVING, MIGRATING, MIGRATED, FAILING_OVER, FAILED_OVER) are received when maintenance events are enabled - disabledDontReceiveNotificationsTest: Verifies no notifications received when maintenance events are disabled - clientHandshakeWithEndpointTypeTest: Tests CLIENT MAINT_NOTIFICATIONS with 'none' endpoint type (nil IP scenario) - clientMaintenanceNotificationInfoTest: Verifies CLIENT MAINT_NOTIFICATIONS configuration with moving-endpoint-type Based on CLIENT MAINT_NOTIFICATIONS implementation from commit bd408cf * Update Redis Enterprise maintenance event notification protocol - Update push notification patterns to include sequence numbers (4-element format) - Fix MOVING notification parsing to handle new address format with sequence and time - Update MIGRATING, MIGRATED, FAILING_OVER, and FAILED_OVER patterns with sequence numbers - Improve FaultInjectionClient status handling: change from 'pending' to 'running' checks - Enhance JSON response parsing with better output field handling and debugging - Remove deprecated maintenance sequence functionality and associated unit test - Add test phase isolation to prevent cleanup notification interference - Extend monitoring timeout from 2 to 5 minutes for longer maintenance operations - Add @AfterEach cleanup to restore cluster state between tests - Remove hardcoded optimal node selection logic in RedisEnterpriseConfig This aligns with the updated Redis Enterprise maintenance events specification and improves test reliability by handling the new notification protocol format. * Fix moving tests for timeout de-relaxation after moving * fix notification capture logic and several tests. * fix up resp2 test, and add proper test for None, will rebase to master * Fix None test * Fix several tests related to handling. 5 tests left to fix up. * fix up new connection test and connection leak tests * fix up traffic test and remove un-needed code. * fix more tests, remove more un-needed code * revert log changes * revert the re-throw change, to be discussed * remove resp3 test after offline discussion * change endpoint name * temporarely reduce number of tests * add more tests * reduce test execution time by 50% * remove hardcoded target config and enable working with 6 nodes and multiple dbs * fix up relaxedtimeoutconfig to use newest functions and add connection handoff test * add 1 more handoff test, add more logging, fix some issues that were raised during review * fix some bugs and remove the un-needed clean-up of testing, to speed up tests by 50% * Merge pull request #1 from kiryazovi-redis/CI-fix-functional-handoff-and-connection-testing-of-maint-events-2 Ci fix functional handoff and connection testing of maint events 2 * optimise relaxed timeoutest, fix compilation issues after renaming done by Ivo * remove MaintenanceNotificationTest, as all functionality is covered now, also implement more fixes and improvements * renamed memoryleak infra, refactored several tests, implemented more fixes from review, started removin comments * remove any useless sleeps, refactor several tests again to be more functionally correct, enable logging for testing
* feat: add JSON read-only commands to ReadOnlyCommands * Do not fail read-only check if the command is not available on the server or the information about it could not be parsed --------- Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.com>
Walkthrough该变更集大幅扩展了 RediSearch、RedisJSON、Stream 与 Vector Sets 的客户端 API(异步/同步/响应式),引入维护事件通知(维护感知看门狗、超时放宽、握手扩展)、更新协议常量与输出解析器,移除多处已弃用 reset/flush 等方法,升级依赖/Netty 传输,调整 DNS 解析资源,补充文档与站点配置,并新增基准可视化页面与导航。 Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as 应用
participant Client as RedisClient
participant Handshake as RedisHandshake
participant Server as Redis
Note over Client,Handshake: 维护通知启用(可选端点类型)
App->>Client: 连接(redisURI)
Client->>Handshake: 创建握手(EndpointTypeSource)
Handshake->>Server: HELLO/握手
Handshake->>Server: CLIENT MAINT_NOTIFICATIONS [MOVING ...]
alt 成功
Server-->>Handshake: OK
Handshake-->>Client: 完成握手
else 失败
Handshake-->>Client: 继续连接流程(记录失败)
end
sequenceDiagram
autonumber
participant Conn as 连接
participant Watchdog as MaintenanceAwareConnectionWatchdog
participant Server as Redis
participant Writer as MaintenanceAwareExpiryWriter
Note over Server,Watchdog: 推送维护事件/MOVING
Server-->>Watchdog: PUSH MOVING/MIGRATING/FAILING_OVER
Watchdog->>Watchdog: 标记REBIND=STARTED
Watchdog->>Conn: 触发重绑/关闭旧通道
Watchdog->>Writer: onRebindStarted(放宽超时)
Note over Writer: 超时=初始+放宽间隔
Watchdog->>Watchdog: 重绑完成→REBIND=COMPLETED
Watchdog->>Writer: onRebindCompleted(延时关闭放宽)
sequenceDiagram
autonumber
participant App as 应用
participant Cmd as *Async/Reactive/Sync Commands
participant Builder as RediSearchCommandBuilder
participant Server as Redis (RediSearch)
App->>Cmd: ftSearch/index, query, args
Cmd->>Builder: 组装命令与输出解析
Builder->>Server: FT.SEARCH ...
Server-->>Cmd: 响应(RESP2/RESP3)
Cmd->>Cmd: SearchReplyParser 解析
Cmd-->>App: SearchReply/结果
Estimated code review effort🎯 5 (Critical) | ⏱️ ~150 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 17
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
src/main/java/io/lettuce/core/resource/IOUringProvider.java (1)
65-74: 修复 io_uring 可用性检测这里仍然尝试加载
io.netty.incubator.channel.uring.IOUring。在迁移到 Netty 4.2 稳定 API 后该类已移除,Class.forName会始终抛出ClassNotFoundException,IOURING_AVAILABLE永远为false,所有 io_uring 支持都会被禁用(阻断性回归)。请改为检测新的io.netty.channel.uring.IoUring(或直接引用已导入的IoUring.class)。- Class.forName("io.netty.incubator.channel.uring.IOUring"); + Class.forName("io.netty.channel.uring.IoUring");src/main/java/io/lettuce/core/cluster/ClusterTopologyRefreshOptions.java (2)
418-424: 更新默认行为说明
这里的 Javadoc 仍宣称“自适应触发器默认禁用”,但代码已改为默认启用全部触发器。请同步文档说明,避免使用者被误导。
243-266: 修正文档中的默认超时描述
这段注释依旧写着“默认 30 秒”,而常量已调整为 5 秒,请同步更新 Javadoc(本方法及其重载处均相同)以反映新的默认值。src/main/java/io/lettuce/core/resource/DefaultClientResources.java (1)
674-685: 修复 mutate() 中共享延迟记录器标志这里把
sharedCommandLatencyCollector赋值成了sharedEventLoopGroupProvider,导致复制出的资源实例错误地认为延迟收集器是否共享,从而在关闭时要么重复关闭共享收集器,要么泄漏未关闭的收集器实例。请改回复制原有的sharedCommandLatencyRecorder状态。- builder.sharedCommandLatencyCollector = sharedEventLoopGroupProvider; + builder.sharedCommandLatencyCollector = sharedCommandLatencyRecorder;
🧹 Nitpick comments (13)
RELEASE-NOTES.md (2)
8-12: 请调整“Key changes”标题层级该段直接从一级标题跳到三级标题,破坏了层级结构,也会触发 markdownlint MD001/MD003。建议改成二级(
## Key changes)或使用与文档其余部分一致的 Setext 风格。-### Key changes +## Key changes
55-56: 请去除重复的变更条目“Timeouts seen during endpoint re-bind and migrate (redis#3426)” 已在“🐛 Bug Fixes”小节列出,再出现于“💡 Other”会让读者误解为新增内容。建议保留一处即可,通常归入修复部分。
src/main/java/io/lettuce/core/resource/KqueueProvider.java (1)
187-189: 建议:兼容子类判断这里直接用
type.equals(MultiThreadIoEventLoopGroup.class),如果未来 Netty 在该类型上返回子类(例如通过工厂包装或内部增强),matches会误判为不支持。改成MultiThreadIoEventLoopGroup.class.isAssignableFrom(type)能够保留对旧类的支持,也能兼容潜在的子类实现。可在不影响现有行为的前提下增强稳健性。.github/workflows/docs.yml (1)
24-27: 可能存在重复安装第 26 行硬编码安装的包(
mkdocs mkdocs-material pymdown-extensions mkdocs-macros-plugin)与第 27 行从requirements.txt安装的包可能重复。考虑删除第 26 行的硬编码安装,仅依赖
requirements.txt:- name: Install dependencies run: | python -m pip install --upgrade pip - pip install mkdocs mkdocs-material pymdown-extensions mkdocs-macros-plugin pip install -r requirements.txtrequirements.txt (1)
1-4: 更新 MkDocs 插件至最新次要版本mkdocs-material、pymdown-extensions 和 mkdocs-macros-plugin 当前次要版本已落后(最新分别为 9.6.21、10.16.1、1.4.0),请更新 requirements.txt 中相应约束以应用这些更新。
src/main/java/io/lettuce/core/protocol/ReconnectionHandler.java (1)
61-61: 保留socketAddressSupplier的 final 修饰符未发现任何继承
ReconnectionHandler的子类对该字段进行重新赋值,移除final并无必要。建议改为:- protected Mono<SocketAddress> socketAddressSupplier; + protected final Mono<SocketAddress> socketAddressSupplier;src/main/java/io/lettuce/core/VSimArgs.java (1)
14-14: 未使用的导入。导入的
OptionalDouble在代码中未被使用,实际使用的是Optional<Double>。建议移除此导入以保持代码整洁。应用此差异来移除未使用的导入:
-import java.util.OptionalDouble;src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java (1)
444-446: 考虑消除与getConnectionReactive的重复。新增的
getStatefulConnection(String nodeId)方法与第448-451行的getConnectionReactive(String nodeId)方法执行相同的连接获取逻辑,仅返回类型不同。类似的重复也出现在主机/端口重载版本中(第463-465行 vs 第458-461行)。建议重构以消除重复,例如让
getConnectionReactive内部调用getStatefulConnection:private Mono<StatefulRedisConnection<K, V>> getStatefulConnection(String nodeId) { return getMono(getConnectionProvider().getConnectionAsync(ConnectionIntent.WRITE, nodeId)); } private Mono<RedisClusterReactiveCommands<K, V>> getConnectionReactive(String nodeId) { - return getMono(getConnectionProvider().<K, V> getConnectionAsync(ConnectionIntent.WRITE, nodeId)) - .map(StatefulRedisConnection::reactive); + return getStatefulConnection(nodeId).map(StatefulRedisConnection::reactive); }对主机/端口版本应用类似的模式。
src/main/java/io/lettuce/core/output/EncodedComplexOutput.java (1)
16-24: 修正构造函数文档注释。第17行的文档注释提到"Constructs a new instance of the {@link ComplexOutput}",应该改为
{@link EncodedComplexOutput}以准确反映正在构造的类。应用此差异来修正文档:
/** - * Constructs a new instance of the {@link ComplexOutput} + * Constructs a new instance of the {@link EncodedComplexOutput} * * @param codec the {@link RedisCodec} to be applied * @param parser */src/main/java/io/lettuce/core/protocol/MaintenanceAwareComponent.java (1)
9-9: 未使用的导入。
ClientOptions在接口中未被使用,虽然在@see标签中被引用,但该引用是在文档注释中,不需要导入。建议移除此导入。应用此差异来移除未使用的导入:
-import io.lettuce.core.ClientOptions; -src/main/java/io/lettuce/core/search/SynonymMapParser.java (1)
73-76: 考虑记录不完整的键值对。当在RESP2格式中遇到不完整的键值对时,代码会静默中断循环。虽然这防止了索引越界,但记录此情况可以帮助调试畸形响应。
考虑添加调试日志:
for (int i = 0; i < synonymArray.size();) { if (i + 2 > synonymArray.size()) { + // 考虑添加: logger.debug("Incomplete synonym pair at index {}, skipping remaining data", i); break; // Incomplete pair, skip }src/main/java/io/lettuce/core/search/AggregationReply.java (1)
52-57: 封装内部字段以避免包内直接篡改。
aggregationGroups、replies与cursorId目前是包级可见,同包其它类可以绕过访问器直接覆盖内部状态,增加后续维护风险。建议将这些字段改为private(replies亦可标记为final)并继续通过已有包级方法维护状态。- long aggregationGroups = 1; + private long aggregationGroups = 1; - - List<SearchReply<K, V>> replies = new ArrayList<>(); + private final List<SearchReply<K, V>> replies = new ArrayList<>(); - - long cursorId = NO_CURSOR; + private long cursorId = NO_CURSOR;Also applies to: 54-55, 56-57
src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionSearchCommands.java (1)
1058-1127: 修正文档中的返回类型描述
ftAggregate两个重载返回AggregationReply<K, V>,但 Javadoc 多处写成 “see {@link SearchReply}” 或描述为返回搜索结果,容易误导使用者。请将返回说明和@see链接改为AggregationReply,并明确包含光标信息的结构,确保 API 文档与实际签名一致。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (135)
.github/release-drafter-config.yml(1 hunks).github/wordlist.txt(2 hunks).github/workflows/benchmarks.yml(1 hunks).github/workflows/docs.yml(2 hunks).github/workflows/integration.yml(1 hunks).gitignore(1 hunks)README.md(1 hunks)RELEASE-NOTES.md(1 hunks)docs/advanced-usage.md(12 hunks)docs/getting-started.md(1 hunks)docs/new-features.md(1 hunks)docs/static/benchmarks/index.html(1 hunks)docs/user-guide/connecting-redis.md(1 hunks)docs/user-guide/redis-search.md(1 hunks)docs/user-guide/vector-sets.md(1 hunks)mkdocs.yml(2 hunks)pom.xml(3 hunks)requirements.txt(1 hunks)src/main/java/io/lettuce/core/AbstractRedisAsyncCommands.java(13 hunks)src/main/java/io/lettuce/core/AbstractRedisClient.java(2 hunks)src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java(13 hunks)src/main/java/io/lettuce/core/ClientOptions.java(8 hunks)src/main/java/io/lettuce/core/CommandListenerWriter.java(0 hunks)src/main/java/io/lettuce/core/ConnectionBuilder.java(4 hunks)src/main/java/io/lettuce/core/ConnectionMetadata.java(3 hunks)src/main/java/io/lettuce/core/MaintNotificationsConfig.java(1 hunks)src/main/java/io/lettuce/core/RediSearchCommandBuilder.java(1 hunks)src/main/java/io/lettuce/core/RedisChannelHandler.java(0 hunks)src/main/java/io/lettuce/core/RedisChannelWriter.java(0 hunks)src/main/java/io/lettuce/core/RedisClient.java(8 hunks)src/main/java/io/lettuce/core/RedisCommandBuilder.java(4 hunks)src/main/java/io/lettuce/core/RedisHandshake.java(5 hunks)src/main/java/io/lettuce/core/RedisJsonCommandBuilder.java(7 hunks)src/main/java/io/lettuce/core/RedisURI.java(14 hunks)src/main/java/io/lettuce/core/RedisVectorSetCommandBuilder.java(4 hunks)src/main/java/io/lettuce/core/SocketOptions.java(4 hunks)src/main/java/io/lettuce/core/StreamDeletionPolicy.java(1 hunks)src/main/java/io/lettuce/core/TimeoutOptions.java(5 hunks)src/main/java/io/lettuce/core/VSimArgs.java(3 hunks)src/main/java/io/lettuce/core/XAddArgs.java(3 hunks)src/main/java/io/lettuce/core/XTrimArgs.java(3 hunks)src/main/java/io/lettuce/core/api/StatefulConnection.java(0 hunks)src/main/java/io/lettuce/core/api/async/BaseRedisAsyncCommands.java(0 hunks)src/main/java/io/lettuce/core/api/async/RediSearchAsyncCommands.java(1 hunks)src/main/java/io/lettuce/core/api/async/RedisAsyncCommands.java(1 hunks)src/main/java/io/lettuce/core/api/async/RedisJsonAsyncCommands.java(7 hunks)src/main/java/io/lettuce/core/api/async/RedisStreamAsyncCommands.java(3 hunks)src/main/java/io/lettuce/core/api/async/RedisVectorSetAsyncCommands.java(2 hunks)src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java(0 hunks)src/main/java/io/lettuce/core/api/reactive/RediSearchReactiveCommands.java(1 hunks)src/main/java/io/lettuce/core/api/reactive/RedisJsonReactiveCommands.java(7 hunks)src/main/java/io/lettuce/core/api/reactive/RedisReactiveCommands.java(1 hunks)src/main/java/io/lettuce/core/api/reactive/RedisStreamReactiveCommands.java(3 hunks)src/main/java/io/lettuce/core/api/reactive/RedisVectorSetReactiveCommands.java(2 hunks)src/main/java/io/lettuce/core/api/sync/BaseRedisCommands.java(0 hunks)src/main/java/io/lettuce/core/api/sync/RediSearchCommands.java(1 hunks)src/main/java/io/lettuce/core/api/sync/RedisCommands.java(1 hunks)src/main/java/io/lettuce/core/api/sync/RedisJsonCommands.java(7 hunks)src/main/java/io/lettuce/core/api/sync/RedisStreamCommands.java(3 hunks)src/main/java/io/lettuce/core/api/sync/RedisVectorSetCommands.java(2 hunks)src/main/java/io/lettuce/core/cluster/ClusterClientOptions.java(5 hunks)src/main/java/io/lettuce/core/cluster/ClusterConnectionProvider.java(0 hunks)src/main/java/io/lettuce/core/cluster/ClusterDistributionChannelWriter.java(0 hunks)src/main/java/io/lettuce/core/cluster/ClusterTopologyRefreshOptions.java(4 hunks)src/main/java/io/lettuce/core/cluster/PooledClusterConnectionProvider.java(0 hunks)src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterAsyncCommandsImpl.java(3 hunks)src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java(3 hunks)src/main/java/io/lettuce/core/cluster/RedisClusterClient.java(4 hunks)src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionAsyncCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionJsonAsyncCommands.java(6 hunks)src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionSearchAsyncCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionStreamAsyncCommands.java(3 hunks)src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionVectorSetAsyncCommands.java(2 hunks)src/main/java/io/lettuce/core/cluster/api/async/RedisClusterAsyncCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/reactive/RedisClusterReactiveCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionJsonCommands.java(6 hunks)src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionSearchCommands.java(1 hunks)src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionStreamCommands.java(3 hunks)src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionVectorSetCommands.java(2 hunks)src/main/java/io/lettuce/core/cluster/api/sync/RedisClusterCommands.java(1 hunks)src/main/java/io/lettuce/core/codec/Utf8StringCodec.java(0 hunks)src/main/java/io/lettuce/core/internal/LettuceClassUtils.java(1 hunks)src/main/java/io/lettuce/core/internal/NetUtils.java(1 hunks)src/main/java/io/lettuce/core/json/DefaultJsonParser.java(3 hunks)src/main/java/io/lettuce/core/json/DelegateJsonArray.java(5 hunks)src/main/java/io/lettuce/core/json/DelegateJsonObject.java(2 hunks)src/main/java/io/lettuce/core/json/DelegateJsonValue.java(2 hunks)src/main/java/io/lettuce/core/masterreplica/MasterReplicaChannelWriter.java(0 hunks)src/main/java/io/lettuce/core/masterreplica/MasterReplicaConnectionProvider.java(0 hunks)src/main/java/io/lettuce/core/masterreplica/ReplicaUtils.java(1 hunks)src/main/java/io/lettuce/core/masterslave/MasterSlaveConnectionWrapper.java(0 hunks)src/main/java/io/lettuce/core/models/stream/StreamEntryDeletionResult.java(1 hunks)src/main/java/io/lettuce/core/output/ArrayComplexData.java(1 hunks)src/main/java/io/lettuce/core/output/ComplexData.java(1 hunks)src/main/java/io/lettuce/core/output/ComplexDataParser.java(1 hunks)src/main/java/io/lettuce/core/output/ComplexOutput.java(2 hunks)src/main/java/io/lettuce/core/output/EncodedComplexOutput.java(1 hunks)src/main/java/io/lettuce/core/output/MapComplexData.java(1 hunks)src/main/java/io/lettuce/core/output/SetComplexData.java(1 hunks)src/main/java/io/lettuce/core/output/StreamEntryDeletionResultListOutput.java(1 hunks)src/main/java/io/lettuce/core/output/VSimScoreAttribsMapOutput.java(1 hunks)src/main/java/io/lettuce/core/protocol/CommandExpiryWriter.java(2 hunks)src/main/java/io/lettuce/core/protocol/CommandHandler.java(2 hunks)src/main/java/io/lettuce/core/protocol/CommandKeyword.java(2 hunks)src/main/java/io/lettuce/core/protocol/CommandType.java(2 hunks)src/main/java/io/lettuce/core/protocol/ConnectionFacade.java(0 hunks)src/main/java/io/lettuce/core/protocol/ConnectionWatchdog.java(2 hunks)src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java(3 hunks)src/main/java/io/lettuce/core/protocol/MaintenanceAwareComponent.java(1 hunks)src/main/java/io/lettuce/core/protocol/MaintenanceAwareConnectionWatchdog.java(1 hunks)src/main/java/io/lettuce/core/protocol/MaintenanceAwareExpiryWriter.java(1 hunks)src/main/java/io/lettuce/core/protocol/ProtocolKeyword.java(1 hunks)src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java(2 hunks)src/main/java/io/lettuce/core/protocol/RebindState.java(1 hunks)src/main/java/io/lettuce/core/protocol/ReconnectionHandler.java(1 hunks)src/main/java/io/lettuce/core/resource/AddressResolverGroupProvider.java(0 hunks)src/main/java/io/lettuce/core/resource/ClientResources.java(1 hunks)src/main/java/io/lettuce/core/resource/DefaultClientResources.java(7 hunks)src/main/java/io/lettuce/core/resource/DnsResolver.java(0 hunks)src/main/java/io/lettuce/core/resource/DnsResolvers.java(0 hunks)src/main/java/io/lettuce/core/resource/EpollProvider.java(2 hunks)src/main/java/io/lettuce/core/resource/EventLoopResources.java(1 hunks)src/main/java/io/lettuce/core/resource/IOUringProvider.java(4 hunks)src/main/java/io/lettuce/core/resource/KqueueProvider.java(2 hunks)src/main/java/io/lettuce/core/search/AggregateReplyParser.java(1 hunks)src/main/java/io/lettuce/core/search/AggregationReply.java(1 hunks)src/main/java/io/lettuce/core/search/SearchReply.java(1 hunks)src/main/java/io/lettuce/core/search/SearchReplyParser.java(1 hunks)src/main/java/io/lettuce/core/search/SpellCheckResult.java(1 hunks)src/main/java/io/lettuce/core/search/SpellCheckResultParser.java(1 hunks)src/main/java/io/lettuce/core/search/Suggestion.java(1 hunks)src/main/java/io/lettuce/core/search/SuggestionParser.java(1 hunks)src/main/java/io/lettuce/core/search/SynonymMapParser.java(1 hunks)src/main/java/io/lettuce/core/search/arguments/AggregateArgs.java(1 hunks)
💤 Files with no reviewable changes (18)
- src/main/java/io/lettuce/core/RedisChannelWriter.java
- src/main/java/io/lettuce/core/cluster/ClusterDistributionChannelWriter.java
- src/main/java/io/lettuce/core/cluster/PooledClusterConnectionProvider.java
- src/main/java/io/lettuce/core/RedisChannelHandler.java
- src/main/java/io/lettuce/core/masterslave/MasterSlaveConnectionWrapper.java
- src/main/java/io/lettuce/core/protocol/ConnectionFacade.java
- src/main/java/io/lettuce/core/api/sync/BaseRedisCommands.java
- src/main/java/io/lettuce/core/masterreplica/MasterReplicaChannelWriter.java
- src/main/java/io/lettuce/core/CommandListenerWriter.java
- src/main/java/io/lettuce/core/cluster/ClusterConnectionProvider.java
- src/main/java/io/lettuce/core/resource/DnsResolvers.java
- src/main/java/io/lettuce/core/api/StatefulConnection.java
- src/main/java/io/lettuce/core/api/async/BaseRedisAsyncCommands.java
- src/main/java/io/lettuce/core/masterreplica/MasterReplicaConnectionProvider.java
- src/main/java/io/lettuce/core/codec/Utf8StringCodec.java
- src/main/java/io/lettuce/core/resource/DnsResolver.java
- src/main/java/io/lettuce/core/resource/AddressResolverGroupProvider.java
- src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java
🧰 Additional context used
🧬 Code graph analysis (46)
src/main/java/io/lettuce/core/protocol/MaintenanceAwareExpiryWriter.java (2)
src/main/java/io/lettuce/core/internal/ExceptionFactory.java (1)
ExceptionFactory(42-158)src/main/java/io/lettuce/core/TimeoutOptions.java (1)
TimeoutSource(265-287)
src/main/java/io/lettuce/core/search/Suggestion.java (1)
src/main/java/io/lettuce/core/search/SpellCheckResult.java (1)
Suggestion(167-226)
src/main/java/io/lettuce/core/search/SuggestionParser.java (1)
src/main/java/io/lettuce/core/output/ComplexData.java (1)
ComplexData(47-154)
src/main/java/io/lettuce/core/output/StreamEntryDeletionResultListOutput.java (3)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)src/main/java/io/lettuce/core/output/ListSubscriber.java (1)
ListSubscriber(34-56)src/main/java/io/lettuce/core/output/OutputFactory.java (1)
OutputFactory(8-28)
src/main/java/io/lettuce/core/ConnectionBuilder.java (4)
src/main/java/io/lettuce/core/resource/IOUringProvider.java (1)
IOUringProvider(51-186)src/main/java/io/lettuce/core/resource/EpollProvider.java (1)
EpollProvider(53-188)src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)src/main/java/io/lettuce/core/resource/KqueueProvider.java (1)
KqueueProvider(50-243)
src/main/java/io/lettuce/core/SocketOptions.java (1)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/RedisJsonCommandBuilder.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/AbstractRedisClient.java (1)
src/main/java/io/lettuce/core/MaintNotificationsConfig.java (2)
MaintNotificationsConfig(43-271)EndpointTypeSource(258-269)
src/main/java/io/lettuce/core/json/DefaultJsonParser.java (1)
src/main/java/io/lettuce/core/json/DelegateJsonValue.java (1)
DelegateJsonValue(23-128)
src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionSearchCommands.java (10)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)src/main/kotlin/io/lettuce/core/api/coroutines/RediSearchCoroutinesCommands.kt (35)
ftCreate(36-1234)ftCreate(62-63)ftCreate(101-102)ftAliasadd(145-146)ftAliasupdate(189-190)ftAliasdel(231-232)ftAlter(278-279)ftAlter(313-314)ftTagvals(369-370)ftSpellcheck(410-411)ftSpellcheck(447-448)ftDictadd(481-482)ftDictdel(504-505)ftDictdump(525-526)ftExplain(558-559)ftExplain(589-590)ftList(625-626)ftSyndump(657-658)ftSynupdate(691-692)ftSynupdate(723-724)ftSugadd(760-761)ftSugadd(787-788)ftSugdel(811-812)ftSugget(836-837)ftSugget(862-863)ftSuglen(884-885)ftDropindex(907-908)ftDropindex(937-938)ftSearch(976-977)ftSearch(1027-1028)ftAggregate(1069-1070)ftAggregate(1125-1126)ftCursorread(1159-1160)ftCursorread(1192-1193)ftCursordel(1231-1232)
src/main/java/io/lettuce/core/search/SpellCheckResult.java (1)
src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)
src/main/java/io/lettuce/core/api/async/RedisVectorSetAsyncCommands.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/cluster/RedisClusterClient.java (1)
src/main/java/io/lettuce/core/protocol/CommandExpiryWriter.java (1)
CommandExpiryWriter(48-208)
src/main/java/io/lettuce/core/RedisClient.java (1)
src/main/java/io/lettuce/core/protocol/CommandExpiryWriter.java (1)
CommandExpiryWriter(48-208)
src/main/java/io/lettuce/core/search/SearchReplyParser.java (2)
src/main/java/io/lettuce/core/codec/StringCodec.java (1)
StringCodec(44-227)src/main/java/io/lettuce/core/output/ComplexData.java (1)
ComplexData(47-154)
src/main/java/io/lettuce/core/json/DelegateJsonValue.java (1)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/api/sync/RedisJsonCommands.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/output/VSimScoreAttribsMapOutput.java (1)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)
src/main/java/io/lettuce/core/search/SpellCheckResultParser.java (2)
src/main/java/io/lettuce/core/codec/StringCodec.java (1)
StringCodec(44-227)src/main/java/io/lettuce/core/output/ComplexData.java (1)
ComplexData(47-154)
src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionJsonCommands.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/RedisVectorSetCommandBuilder.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/api/sync/RediSearchCommands.java (10)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)src/main/kotlin/io/lettuce/core/api/coroutines/RediSearchCoroutinesCommands.kt (35)
ftCreate(36-1234)ftCreate(62-63)ftCreate(101-102)ftAliasadd(145-146)ftAliasupdate(189-190)ftAliasdel(231-232)ftAlter(278-279)ftAlter(313-314)ftTagvals(369-370)ftSpellcheck(410-411)ftSpellcheck(447-448)ftDictadd(481-482)ftDictdel(504-505)ftDictdump(525-526)ftExplain(558-559)ftExplain(589-590)ftList(625-626)ftSyndump(657-658)ftSynupdate(691-692)ftSynupdate(723-724)ftSugadd(760-761)ftSugadd(787-788)ftSugdel(811-812)ftSugget(836-837)ftSugget(862-863)ftSuglen(884-885)ftDropindex(907-908)ftDropindex(937-938)ftSearch(976-977)ftSearch(1027-1028)ftAggregate(1069-1070)ftAggregate(1125-1126)ftCursorread(1159-1160)ftCursorread(1192-1193)ftCursordel(1231-1232)
src/main/java/io/lettuce/core/api/reactive/RedisVectorSetReactiveCommands.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/TimeoutOptions.java (1)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/resource/DefaultClientResources.java (2)
src/main/java/io/lettuce/core/resource/Transports.java (1)
Transports(21-138)src/main/java/io/lettuce/core/resource/SocketAddressResolver.java (1)
SocketAddressResolver(17-106)
src/main/java/io/lettuce/core/RedisCommandBuilder.java (2)
src/main/java/io/lettuce/core/output/StreamEntryDeletionResultListOutput.java (1)
StreamEntryDeletionResultListOutput(22-63)src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/api/async/RedisJsonAsyncCommands.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/RediSearchCommandBuilder.java (23)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)src/main/java/io/lettuce/core/output/BooleanOutput.java (1)
BooleanOutput(36-57)src/main/java/io/lettuce/core/output/ComplexOutput.java (1)
ComplexOutput(30-153)src/main/java/io/lettuce/core/output/EncodedComplexOutput.java (1)
EncodedComplexOutput(14-40)src/main/java/io/lettuce/core/output/IntegerOutput.java (1)
IntegerOutput(35-56)src/main/java/io/lettuce/core/output/StatusOutput.java (1)
StatusOutput(34-47)src/main/java/io/lettuce/core/output/ValueListOutput.java (1)
ValueListOutput(37-79)src/main/java/io/lettuce/core/protocol/BaseRedisCommandBuilder.java (1)
BaseRedisCommandBuilder(22-225)src/main/java/io/lettuce/core/protocol/CommandArgs.java (1)
CommandArgs(55-754)src/main/java/io/lettuce/core/search/AggregateReplyParser.java (1)
AggregateReplyParser(32-99)src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SearchReplyParser.java (1)
SearchReplyParser(45-296)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/SpellCheckResultParser.java (1)
SpellCheckResultParser(38-260)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/SuggestionParser.java (1)
SuggestionParser(34-129)src/main/java/io/lettuce/core/search/SynonymMapParser.java (1)
SynonymMapParser(36-119)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)
src/main/java/io/lettuce/core/api/async/RediSearchAsyncCommands.java (10)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)src/main/kotlin/io/lettuce/core/api/coroutines/RediSearchCoroutinesCommands.kt (35)
ftCreate(36-1234)ftCreate(62-63)ftCreate(101-102)ftAliasadd(145-146)ftAliasupdate(189-190)ftAliasdel(231-232)ftAlter(278-279)ftAlter(313-314)ftTagvals(369-370)ftSpellcheck(410-411)ftSpellcheck(447-448)ftDictadd(481-482)ftDictdel(504-505)ftDictdump(525-526)ftExplain(558-559)ftExplain(589-590)ftList(625-626)ftSyndump(657-658)ftSynupdate(691-692)ftSynupdate(723-724)ftSugadd(760-761)ftSugadd(787-788)ftSugdel(811-812)ftSugget(836-837)ftSugget(862-863)ftSuglen(884-885)ftDropindex(907-908)ftDropindex(937-938)ftSearch(976-977)ftSearch(1027-1028)ftAggregate(1069-1070)ftAggregate(1125-1126)ftCursorread(1159-1160)ftCursorread(1192-1193)ftCursordel(1231-1232)
src/main/java/io/lettuce/core/api/reactive/RedisJsonReactiveCommands.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/search/SynonymMapParser.java (1)
src/main/java/io/lettuce/core/output/ComplexData.java (1)
ComplexData(47-154)
src/main/java/io/lettuce/core/cluster/ClusterTopologyRefreshOptions.java (1)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/search/AggregateReplyParser.java (1)
src/main/java/io/lettuce/core/output/ComplexData.java (1)
ComplexData(47-154)
src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionSearchAsyncCommands.java (9)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)
src/main/java/io/lettuce/core/MaintNotificationsConfig.java (2)
src/main/java/io/lettuce/core/internal/NetUtils.java (1)
NetUtils(14-44)src/main/java/io/lettuce/core/ClientOptions.java (1)
Builder(205-520)
src/main/java/io/lettuce/core/RedisHandshake.java (5)
src/main/java/io/lettuce/core/MaintNotificationsConfig.java (2)
MaintNotificationsConfig(43-271)EndpointTypeSource(258-269)src/main/java/io/lettuce/core/output/StatusOutput.java (1)
StatusOutput(34-47)src/main/java/io/lettuce/core/protocol/AsyncCommand.java (1)
AsyncCommand(47-235)src/main/java/io/lettuce/core/protocol/Command.java (1)
Command(37-186)src/main/java/io/lettuce/core/protocol/CommandArgs.java (1)
CommandArgs(55-754)
src/main/java/io/lettuce/core/protocol/MaintenanceAwareConnectionWatchdog.java (3)
src/main/java/io/lettuce/core/codec/StringCodec.java (1)
StringCodec(44-227)src/main/java/io/lettuce/core/protocol/ConnectionWatchdog.java (1)
ChannelHandler(61-441)src/main/java/io/lettuce/core/protocol/ChannelLogDescriptor.java (1)
ChannelLogDescriptor(8-41)
src/main/java/io/lettuce/core/ClientOptions.java (1)
src/main/java/io/lettuce/core/MaintNotificationsConfig.java (1)
MaintNotificationsConfig(43-271)
src/main/java/io/lettuce/core/search/arguments/AggregateArgs.java (2)
src/main/java/io/lettuce/core/protocol/CommandArgs.java (1)
CommandArgs(55-754)src/main/java/io/lettuce/core/search/arguments/SearchArgs.java (1)
SuppressWarnings(29-634)
src/main/java/io/lettuce/core/api/reactive/RediSearchReactiveCommands.java (9)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)
src/main/java/io/lettuce/core/RedisURI.java (1)
src/main/java/io/lettuce/core/internal/LettuceAssert.java (1)
LettuceAssert(12-240)
src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionVectorSetCommands.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionVectorSetAsyncCommands.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionJsonAsyncCommands.java (2)
src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommands.kt (21)
jsonArrappend(29-555)jsonArrappend(41-41)jsonArrappend(51-51)jsonArrappend(61-61)jsonArrappend(72-72)jsonArrindex(84-84)jsonArrindex(97-97)jsonArrindex(110-110)jsonArrindex(122-122)jsonArrinsert(135-135)jsonArrinsert(147-147)jsonMerge(315-315)jsonMerge(326-326)jsonSet(419-419)jsonSet(438-438)jsonSet(449-449)jsonSet(461-461)jsonStrappend(472-472)jsonStrappend(482-482)jsonStrappend(492-492)jsonStrappend(503-503)src/main/kotlin/io/lettuce/core/api/coroutines/RedisJsonCoroutinesCommandsImpl.kt (20)
jsonArrappend(34-35)jsonArrappend(38-39)jsonArrappend(41-42)jsonArrappend(45-46)jsonArrindex(48-53)jsonArrindex(55-56)jsonArrindex(59-60)jsonArrindex(63-68)jsonArrinsert(70-75)jsonArrinsert(78-83)jsonMerge(117-118)jsonMerge(120-121)jsonSet(158-159)jsonSet(161-162)jsonSet(164-165)jsonSet(167-168)jsonStrappend(143-144)jsonStrappend(147-148)jsonStrappend(150-151)jsonStrappend(153-154)
src/main/java/io/lettuce/core/api/sync/RedisVectorSetCommands.java (3)
src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommands.kt (4)
vsimWithScoreWithAttribs(506-507)vsimWithScoreWithAttribs(524-525)vsimWithScoreWithAttribs(543-544)vsimWithScoreWithAttribs(562-563)src/main/kotlin/io/lettuce/core/api/coroutines/RedisVectorSetCoroutinesCommandsImpl.kt (4)
vsimWithScoreWithAttribs(93-94)vsimWithScoreWithAttribs(96-97)vsimWithScoreWithAttribs(99-100)vsimWithScoreWithAttribs(102-103)
src/main/java/io/lettuce/core/AbstractRedisAsyncCommands.java (15)
src/main/java/io/lettuce/core/search/AggregationReply.java (1)
AggregationReply(48-168)src/main/java/io/lettuce/core/search/SearchReply.java (1)
SearchReply(29-292)src/main/java/io/lettuce/core/search/SpellCheckResult.java (2)
SpellCheckResult(24-228)Suggestion(167-226)src/main/java/io/lettuce/core/search/Suggestion.java (1)
Suggestion(22-121)src/main/java/io/lettuce/core/search/arguments/ExplainArgs.java (1)
ExplainArgs(22-72)src/main/java/io/lettuce/core/search/arguments/SpellCheckArgs.java (1)
SpellCheckArgs(26-189)src/main/java/io/lettuce/core/search/arguments/SugAddArgs.java (1)
SugAddArgs(23-100)src/main/java/io/lettuce/core/search/arguments/SugGetArgs.java (1)
SugGetArgs(23-170)src/main/java/io/lettuce/core/search/arguments/SynUpdateArgs.java (1)
SynUpdateArgs(22-71)src/main/java/io/lettuce/core/vector/VSimScoreAttribs.java (1)
VSimScoreAttribs(13-32)src/main/java/io/lettuce/core/search/arguments/AggregateArgs.java (1)
SuppressWarnings(80-1117)src/main/java/io/lettuce/core/search/arguments/FieldArgs.java (1)
SuppressWarnings(28-282)src/main/java/io/lettuce/core/search/arguments/CreateArgs.java (1)
SuppressWarnings(29-530)src/main/java/io/lettuce/core/json/JsonPath.java (1)
JsonPath(58-124)src/main/java/io/lettuce/core/json/arguments/JsonRangeArgs.java (1)
JsonRangeArgs(24-116)
🪛 markdownlint-cli2 (0.18.1)
RELEASE-NOTES.md
8-8: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
8-8: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
20-20: Bare URL used
(MD034, no-bare-urls)
21-21: Bare URL used
(MD034, no-bare-urls)
22-22: Bare URL used
(MD034, no-bare-urls)
23-23: Bare URL used
(MD034, no-bare-urls)
24-24: Bare URL used
(MD034, no-bare-urls)
25-25: Bare URL used
(MD034, no-bare-urls)
27-27: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
29-29: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
42-42: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
48-48: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
53-53: Heading style
Expected: setext; Actual: atx
(MD003, heading-style)
docs/advanced-usage.md
2621-2621: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
2621-2621: Emphasis style
Expected: underscore; Actual: asterisk
(MD049, emphasis-style)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build and Test (7.4)
- GitHub Check: Build and Test (7.2)
- GitHub Check: Build and Test (8.0)
- GitHub Check: Build and Test (8.2)
- GitHub Check: doctests
- GitHub Check: Analyze (java-kotlin)
| - 'feature/*' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - '[0-9].*' | ||
| - 'feature/*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
分支通配符不足以覆盖常见 feature 分支层级
'*' 在 GitHub Actions 的分支模式中不会跨越 /,因此像 feature/alice/new-endpoint 这类常见的多级特性分支依旧不会触发工作流。建议改用 feature/**,以确保任何深度的 feature 分支都能触发 CI。
- - 'feature/*'
+ - 'feature/**'
@@
- - 'feature/*'
+ - 'feature/**'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - 'feature/*' | |
| pull_request: | |
| branches: | |
| - main | |
| - '[0-9].*' | |
| - 'feature/*' | |
| - 'feature/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - '[0-9].*' | |
| - 'feature/**' |
🤖 Prompt for AI Agents
.github/workflows/integration.yml around lines 11 to 16: the branch glob
'feature/*' does not match branches with slashes (e.g.,
feature/alice/new-endpoint); update both occurrences to 'feature/**' so the
workflow triggers for feature branches at any depth, keeping the existing quotes
and pattern order intact.
| <dependency> | ||
| <groupId>io.netty</groupId> | ||
| <artifactId>netty-transport-native-epoll</artifactId> | ||
| <classifier>linux-x86_64</classifier> | ||
| <artifactId>netty-transport-classes-epoll</artifactId> | ||
| <optional>true</optional> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.netty</groupId> | ||
| <artifactId>netty-transport-native-kqueue</artifactId> | ||
| <classifier>osx-x86_64</classifier> | ||
| <artifactId>netty-transport-classes-kqueue</artifactId> | ||
| <optional>true</optional> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.netty.incubator</groupId> | ||
| <artifactId>netty-incubator-transport-native-io_uring</artifactId> | ||
| <version>0.0.26.Final</version> | ||
| <classifier>linux-x86_64</classifier> | ||
| <groupId>io.netty</groupId> | ||
| <artifactId>netty-transport-classes-io_uring</artifactId> | ||
| <optional>true</optional> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
恢复 Netty 原生传输依赖,避免功能退化
这里把 netty-transport-native-* 直接替换成了 netty-transport-classes-*,只留下纯 Java 壳层。缺少带 JNI 的原生工件后,运行时无法加载 epoll/kqueue/io_uring,本应启用的本地传输会全部回退到 NIO,相关特性(低延迟事件循环、先进队列特性等)都会失效。这是 4.2 线的 breaking change:需要同时声明 classes 与 native 工件,并为原生部分保留 classifier。请将原生依赖补回,示例修复如下:
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-classes-epoll</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-transport-native-epoll</artifactId>
+ <classifier>${os.detected.classifier}</classifier>
+ <optional>true</optional>
+ </dependency>
@@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-classes-kqueue</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-transport-native-kqueue</artifactId>
+ <classifier>${os.detected.classifier}</classifier>
+ <optional>true</optional>
+ </dependency>
@@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-classes-io_uring</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-transport-native-io_uring</artifactId>
+ <classifier>${os.detected.classifier}</classifier>
+ <optional>true</optional>
+ </dependency>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-native-epoll</artifactId> | |
| <classifier>linux-x86_64</classifier> | |
| <artifactId>netty-transport-classes-epoll</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-native-kqueue</artifactId> | |
| <classifier>osx-x86_64</classifier> | |
| <artifactId>netty-transport-classes-kqueue</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty.incubator</groupId> | |
| <artifactId>netty-incubator-transport-native-io_uring</artifactId> | |
| <version>0.0.26.Final</version> | |
| <classifier>linux-x86_64</classifier> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-classes-io_uring</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-classes-epoll</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-native-epoll</artifactId> | |
| <classifier>${os.detected.classifier}</classifier> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-classes-kqueue</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-native-kqueue</artifactId> | |
| <classifier>${os.detected.classifier}</classifier> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-classes-io_uring</artifactId> | |
| <optional>true</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-transport-native-io_uring</artifactId> | |
| <classifier>${os.detected.classifier}</classifier> | |
| <optional>true</optional> | |
| </dependency> |
| <jvmTarget>1.8</jvmTarget> | ||
| <languageVersion>1.3</languageVersion> | ||
| <apiVersion>1.3</apiVersion> | ||
| <languageVersion>1.4</languageVersion> | ||
| <apiVersion>1.4</apiVersion> | ||
| <args> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正 Kotlin 编译参数以匹配 2.0.0
已经将 ${kotlin.version} 升到 2.0.0,但这里仍强制 languageVersion/apiVersion 为 1.4。Kotlin 2.0 编译器已不再支持 1.4 语言级别,构建会直接失败(Unsupported Kotlin language level: 1.4)。请把这两项同步到 2.0(或干脆移除让插件采用默认值),例如:
- <languageVersion>1.4</languageVersion>
- <apiVersion>1.4</apiVersion>
+ <languageVersion>2.0</languageVersion>
+ <apiVersion>2.0</apiVersion>🤖 Prompt for AI Agents
In pom.xml around lines 799-802, the Kotlin compiler settings force
languageVersion and apiVersion to 1.4 while ${kotlin.version} is 2.0.0, causing
build failure; update the <languageVersion> and <apiVersion> to "2.0" (or remove
these tags so the plugin uses sensible defaults matching the Kotlin version) and
verify jvmTarget remains compatible (e.g., "1.8" or higher) before rebuilding.
| public static final Set<RefreshTrigger> DEFAULT_ADAPTIVE_REFRESH_TRIGGERS = EnumSet.allOf(RefreshTrigger.class); | ||
|
|
||
| public static final long DEFAULT_ADAPTIVE_REFRESH_TIMEOUT = 30; | ||
| /** Since Lettuce 7.0 the default adaptive refresh timeout is 5 seconds */ | ||
| public static final long DEFAULT_ADAPTIVE_REFRESH_TIMEOUT = 5; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请保持默认触发器集合不可变
将 EnumSet.allOf(...) 直接公开为 public static final Set 使得调用方现在可以原地修改默认集合,这与此前不可变的默认值行为不一致,会导致全局状态被意外篡改。请在赋值时包装为不可变集合(或改用 Collections.unmodifiableSet(EnumSet.allOf(...)))以恢复原有的线程安全与封装保证。
- public static final Set<RefreshTrigger> DEFAULT_ADAPTIVE_REFRESH_TRIGGERS = EnumSet.allOf(RefreshTrigger.class);
+ public static final Set<RefreshTrigger> DEFAULT_ADAPTIVE_REFRESH_TRIGGERS =
+ Collections.unmodifiableSet(EnumSet.allOf(RefreshTrigger.class));🤖 Prompt for AI Agents
src/main/java/io/lettuce/core/cluster/ClusterTopologyRefreshOptions.java lines
42-46: 当前将 EnumSet.allOf(RefreshTrigger.class) 直接暴露为 public static final
Set,允许调用方修改默认集合,请将其包装为不可变集合以恢复不可变语义;替换赋值为不可变包装(例如
Collections.unmodifiableSet(EnumSet.allOf(...)) 或使用
Set.copyOf(EnumSet.allOf(...))),确保字段仍为 public static final 并保留原有类型为
Set<RefreshTrigger>,以防止外部修改全局默认集合。
| if (options.isKeepAlive() && options.isExtendedKeepAlive()) { | ||
|
|
||
| SocketOptions.KeepAliveOptions keepAlive = options.getKeepAlive(); | ||
| boolean applied = false; | ||
|
|
||
| if (IOUringProvider.isAvailable()) { | ||
| IOUringProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | ||
| applied = true; | ||
| } else if (io.lettuce.core.resource.EpollProvider.isAvailable()) { | ||
| EpollProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | ||
| applied = true; | ||
| } else if (ExtendedNioSocketOptions.isAvailable() && !KqueueProvider.isAvailable()) { | ||
| ExtendedNioSocketOptions.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), | ||
| keepAlive.getInterval()); | ||
| } else { | ||
| logger.warn("Cannot apply extended TCP keepalive options to channel type " + channelClass.getName()); | ||
| applied = true; | ||
| } | ||
|
|
||
| LettuceAssert.assertState(applied, | ||
| "Extended TCP keepalive options could not be applied. Native transports (io_uring or epoll) or a compatible NIO transport are required."); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修复 macOS 上扩展 KeepAlive 断言导致的启动失败
这里在 ExtendedNioSocketOptions.isAvailable() 分支新增了 !KqueueProvider.isAvailable() 限制。macOS 环境通常会加载 Netty kqueue,本分支因而被跳过,而 kqueue 又没有对应的 applyKeepAlive 实现,导致 applied 始终为 false,随后的断言直接抛出 IllegalStateException,在启用扩展 KeepAlive 时无法启动连接。请恢复 NIO 分支的可用性(或为 kqueue 单独实现 applyKeepAlive),例如移除这段附加条件:
- } else if (ExtendedNioSocketOptions.isAvailable() && !KqueueProvider.isAvailable()) {
+ } else if (ExtendedNioSocketOptions.isAvailable()) {
ExtendedNioSocketOptions.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(),
keepAlive.getInterval());
applied = true;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (options.isKeepAlive() && options.isExtendedKeepAlive()) { | |
| SocketOptions.KeepAliveOptions keepAlive = options.getKeepAlive(); | |
| boolean applied = false; | |
| if (IOUringProvider.isAvailable()) { | |
| IOUringProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | |
| applied = true; | |
| } else if (io.lettuce.core.resource.EpollProvider.isAvailable()) { | |
| EpollProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | |
| applied = true; | |
| } else if (ExtendedNioSocketOptions.isAvailable() && !KqueueProvider.isAvailable()) { | |
| ExtendedNioSocketOptions.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), | |
| keepAlive.getInterval()); | |
| } else { | |
| logger.warn("Cannot apply extended TCP keepalive options to channel type " + channelClass.getName()); | |
| applied = true; | |
| } | |
| LettuceAssert.assertState(applied, | |
| "Extended TCP keepalive options could not be applied. Native transports (io_uring or epoll) or a compatible NIO transport are required."); | |
| } | |
| if (options.isKeepAlive() && options.isExtendedKeepAlive()) { | |
| SocketOptions.KeepAliveOptions keepAlive = options.getKeepAlive(); | |
| boolean applied = false; | |
| if (IOUringProvider.isAvailable()) { | |
| IOUringProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | |
| applied = true; | |
| } else if (io.lettuce.core.resource.EpollProvider.isAvailable()) { | |
| EpollProvider.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), keepAlive.getInterval()); | |
| applied = true; | |
| } else if (ExtendedNioSocketOptions.isAvailable()) { | |
| ExtendedNioSocketOptions.applyKeepAlive(bootstrap, keepAlive.getCount(), keepAlive.getIdle(), | |
| keepAlive.getInterval()); | |
| applied = true; | |
| } | |
| LettuceAssert.assertState(applied, | |
| "Extended TCP keepalive options could not be applied. Native transports (io_uring or epoll) or a compatible NIO transport are required."); | |
| } |
🤖 Prompt for AI Agents
In src/main/java/io/lettuce/core/ConnectionBuilder.java around lines 309 to 328,
the conditional added `&& !KqueueProvider.isAvailable()` prevents the Extended
NIO keepalive branch from running on macOS (where kqueue is present) which
leaves `applied` false and triggers the assert; remove the
`!KqueueProvider.isAvailable()` restriction (or alternatively implement and call
a kqueue-specific applyKeepAlive) so that
ExtendedNioSocketOptions.applyKeepAlive(...) is allowed to run on NIO transports
and the `applied` flag can be set true when keepalive is applied.
| args.add("*"); | ||
| } else { | ||
| // Count the total number of arguments (field + optional AS + alias) | ||
| int argCount = 0; | ||
| for (LoadField<K> loadField : loadFields) { | ||
| argCount++; // field | ||
| if (loadField.alias != null) { | ||
| argCount += 2; // AS + alias | ||
| } | ||
| } | ||
| args.add(argCount); | ||
| for (LoadField<K> loadField : loadFields) { | ||
| args.add(loadField.field.toString()); | ||
| if (loadField.alias != null) { | ||
| args.add(CommandKeyword.AS); | ||
| args.add(loadField.alias.toString()); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修复 LOAD 参数的空指针与二进制安全问题
这里存在两处隐患:其一,当 loadAll() 与 load(...) 混用时,loadField.field 会为 null,循环内的 toString() 会立刻抛出 NullPointerException;其二,即便不出 NPE,直接调用 toString() 也会令非字符串编解码器(例如 ByteArrayCodec)的字段名/别名被错误编码,生成无法被 Redis 识别的命令。请在进入循环前拒绝(或显式处理)null 字段,并改用 CommandArgs.addKey(...) 来保持二进制安全。示例修正如下:
@@
- args.add(loadField.field.toString());
+ LettuceAssert.notNull(loadField.field, "Field must not be null when LOAD clauses are combined");
+ args.addKey(loadField.field);
if (loadField.alias != null) {
args.add(CommandKeyword.AS);
- args.add(loadField.alias.toString());
+ args.addKey(loadField.alias);
}别忘了为新增的断言引入 io.lettuce.core.internal.LettuceAssert。
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| args.add("*"); | |
| } else { | |
| // Count the total number of arguments (field + optional AS + alias) | |
| int argCount = 0; | |
| for (LoadField<K> loadField : loadFields) { | |
| argCount++; // field | |
| if (loadField.alias != null) { | |
| argCount += 2; // AS + alias | |
| } | |
| } | |
| args.add(argCount); | |
| for (LoadField<K> loadField : loadFields) { | |
| args.add(loadField.field.toString()); | |
| if (loadField.alias != null) { | |
| args.add(CommandKeyword.AS); | |
| args.add(loadField.alias.toString()); | |
| } | |
| } | |
| } | |
| args.add(argCount); | |
| for (LoadField<K> loadField : loadFields) { | |
| LettuceAssert.notNull(loadField.field, "Field must not be null when LOAD clauses are combined"); | |
| args.addKey(loadField.field); | |
| if (loadField.alias != null) { | |
| args.add(CommandKeyword.AS); | |
| args.addKey(loadField.alias); | |
| } | |
| } |
| public SearchReplyParser(RedisCodec<K, V> codec) { | ||
| this.codec = codec; | ||
| this.withScores = false; | ||
| this.withContent = true; | ||
| this.withIds = false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
解析 RESP2 结果时存在索引错位导致崩溃
默认构造函数将 withIds 设为 false,随后 parseResults 在每轮循环里不消费实际返回的文档 ID,而是硬编码解码 "0" 并立即尝试把真正的 ID 当成内容字段去转换。只要开启 withContent(默认就是 true),这里就会把 ByteBuffer 强转成 ComplexData,运行期直接抛出 ClassCastException;即便关闭 withContent,所有结果的 ID 也会被错误地固定成 "0"。FT.SEARCH 的 RESP2 回复第一位永远是文档 ID,所以我们必须始终先读取它,再根据 withIds 决定是否保留。建议:
- this.withIds = false;
+ this.withIds = true;
…
- for (int i = 1; i < resultsList.size();) {
-
- K id = codec.decodeKey(StringCodec.UTF8.encodeKey("0"));
- if (withIds) {
- id = codec.decodeKey((ByteBuffer) resultsList.get(i));
- i++;
- }
-
- final SearchReply.SearchResult<K, V> searchResult = new SearchReply.SearchResult<>(id);
+ for (int i = 1; i < resultsList.size();) {
+ ByteBuffer rawId = (ByteBuffer) resultsList.get(i++);
+ final SearchReply.SearchResult<K, V> searchResult = withIds
+ ? new SearchReply.SearchResult<>(codec.decodeKey(rawId))
+ : new SearchReply.SearchResult<>();这样既能正确推进索引,也能在不需要 ID 时丢弃但不破坏后续解析。后面还需按实际结构继续处理 payload、sort key 等可选字段。
Also applies to: 170-198
🤖 Prompt for AI Agents
In src/main/java/io/lettuce/core/search/SearchReplyParser.java around lines
93-98 (and similarly 170-198), the constructor defaulting withIds=false leads
parseResults to skip consuming the actual document ID and instead
hardcode/decode "0", causing index misalignment and ClassCastException when
withContent is true; change parseResults so that on every result it first
reads/consumes the RESP2 document ID element (advance the read index), then if
withIds==true store that ID, otherwise discard it, and only after consuming the
ID proceed to decode payload/content/sortkey per the optional flags—this ensures
the read pointer stays correct and avoids casting ByteBuffer into ComplexData or
fixing all IDs to "0".
| if (resultsMap.containsKey(RESULTS_KEY)) { | ||
| ComplexData results = (ComplexData) resultsMap.get(RESULTS_KEY); | ||
|
|
||
| results.getDynamicList().forEach(result -> { | ||
| ComplexData resultData = (ComplexData) result; | ||
| Map<Object, Object> resultEntry = resultData.getDynamicMap(); | ||
|
|
||
| SearchReply.SearchResult<K, V> searchResult; | ||
| if (resultEntry.containsKey(ID_KEY)) { | ||
| final K id = codec.decodeKey((ByteBuffer) resultEntry.get(ID_KEY)); | ||
| searchResult = new SearchReply.SearchResult<>(id); | ||
| } else { | ||
| searchResult = new SearchReply.SearchResult<>(); | ||
| } | ||
|
|
||
| if (resultEntry.containsKey(SCORE_KEY)) { | ||
| if (resultEntry.get(SCORE_KEY) instanceof Double) { | ||
| searchResult.setScore((Double) resultEntry.get(SCORE_KEY)); | ||
| } else { | ||
| ComplexData scores = (ComplexData) resultEntry.get(SCORE_KEY); | ||
| List<Object> scoresList = scores.getDynamicList(); | ||
| searchResult.setScore((Double) scoresList.get(0)); | ||
| } | ||
| } | ||
|
|
||
| if (resultEntry.containsKey(EXTRA_ATTRIBUTES_KEY)) { | ||
| ComplexData extraAttributes = (ComplexData) resultEntry.get(EXTRA_ATTRIBUTES_KEY); | ||
| extraAttributes.getDynamicMap().forEach((key, value) -> { | ||
| K decodedKey = codec.decodeKey((ByteBuffer) key); | ||
| V decodedValue = codec.decodeValue((ByteBuffer) value); | ||
| searchResult.addFields(decodedKey, decodedValue); | ||
| }); | ||
| } | ||
| searchReply.addResult(searchResult); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RESP3 解析遗漏字段内容
RESP3 版本结果的每个条目会通过 "values"(以及 "payload"、"sortkey" 等键)携带文档字段,但当前实现只处理了 extra_attributes,导致返回的 SearchResult 始终没有任何字段数据。若用户请求 WITHCONTENT/RETURN,他们会得到空字段集合,这是功能缺陷。请补上对 VALUES_KEY(以及可选 payload/sort key)的解析,并在 withContent/withScores 等标志基础上决定是否读取,避免无内容时误解析。
🤖 Prompt for AI Agents
In src/main/java/io/lettuce/core/search/SearchReplyParser.java around lines 239
to 273, the RESP3 parsing currently only extracts extra_attributes and therefore
omits document fields carried under VALUES (and optional payload/sortkey) so
SearchResult fields are empty when clients request WITHCONTENT/RETURN; update
the parsing to check for VALUES_KEY in resultEntry and, when the parser context
indicates content/payload/sortkey were requested (e.g.,
withContent/withScores/withPayload/withSortKey flags), decode the VALUES list
into key/value pairs using codec.decodeKey/decodeValue and add them to
searchResult via addFields, also handle payload and sortkey if present (decode
and store appropriately), and ensure you only attempt to parse these keys when
present to avoid NPEs or false parsing when content was not requested.
| for (Object suggestionObj : suggestionsArray) { | ||
| Map<Object, Object> suggestionMap = ((ComplexData) suggestionObj).getDynamicMap(); | ||
|
|
||
| for (Object suggestion : suggestionMap.keySet()) { | ||
| double score = (double) suggestionMap.get(suggestion); | ||
| V suggestionValue = codec.decodeValue((ByteBuffer) suggestion); | ||
| suggestions.add(new SpellCheckResult.Suggestion<>(score, suggestionValue)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修复 RESP3 建议解析时的类型转换问题
此处直接将 suggestionMap.get(suggestion) 强制转换为 double,并假定 suggestion 是 ByteBuffer。在 RESP3 中,这些字段经常以 ByteBuffer 或字符串返回,会立刻触发 ClassCastException,导致整次解析失败。建议复用已有的 parseScore(...) 与 decodeValue(...) 工具方法来做安全解码。
- for (Object suggestion : suggestionMap.keySet()) {
- double score = (double) suggestionMap.get(suggestion);
- V suggestionValue = codec.decodeValue((ByteBuffer) suggestion);
- suggestions.add(new SpellCheckResult.Suggestion<>(score, suggestionValue));
- }
+ for (Object suggestion : suggestionMap.keySet()) {
+ double score = parseScore(suggestionMap.get(suggestion));
+ V suggestionValue = decodeValue(suggestion);
+ suggestions.add(new SpellCheckResult.Suggestion<>(score, suggestionValue));
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for (Object suggestionObj : suggestionsArray) { | |
| Map<Object, Object> suggestionMap = ((ComplexData) suggestionObj).getDynamicMap(); | |
| for (Object suggestion : suggestionMap.keySet()) { | |
| double score = (double) suggestionMap.get(suggestion); | |
| V suggestionValue = codec.decodeValue((ByteBuffer) suggestion); | |
| suggestions.add(new SpellCheckResult.Suggestion<>(score, suggestionValue)); | |
| } | |
| for (Object suggestionObj : suggestionsArray) { | |
| Map<Object, Object> suggestionMap = ((ComplexData) suggestionObj).getDynamicMap(); | |
| for (Object suggestion : suggestionMap.keySet()) { | |
| double score = parseScore(suggestionMap.get(suggestion)); | |
| V suggestionValue = decodeValue(suggestion); | |
| suggestions.add(new SpellCheckResult.Suggestion<>(score, suggestionValue)); | |
| } |
🤖 Prompt for AI Agents
In src/main/java/io/lettuce/core/search/SpellCheckResultParser.java around lines
115 to 122, the code currently casts suggestionMap.get(suggestion) to double and
assumes suggestion is a ByteBuffer which causes ClassCastException for RESP3
returns; replace the direct casts by calling the existing parseScore(...)
utility to obtain the score safely (handling String/ByteBuffer/Number) and call
decodeValue(...) (the existing helper that handles ByteBuffer and String) for
the suggestion value, then construct the Suggestion with those parsed values so
parsing is resilient to RESP3 types.
| private Double parseScore(Object scoreObj) { | ||
| if (scoreObj == null) { | ||
| return null; | ||
| } | ||
|
|
||
| if (scoreObj instanceof Double) { | ||
| return (Double) scoreObj; | ||
| } | ||
|
|
||
| return 0.0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正 WITHSCORES 返回值的解析错误
FT.SUGGET 的分值在 RESP2/RESP3 下可能以 Number、String/byte[](bulk string)甚至 ByteBuffer 形式返回。当前实现除了 Double 外全部强制返回 0.0,会把合法分值直接丢弃。请正确地把这些常见类型解析成 Double,无法解析时再回退为 null 并记录日志,以免出现静默的数据错误。
- if (scoreObj instanceof Double) {
- return (Double) scoreObj;
- }
-
- return 0.0;
+ if (scoreObj instanceof Number) {
+ return ((Number) scoreObj).doubleValue();
+ }
+
+ String asString = null;
+
+ if (scoreObj instanceof CharSequence) {
+ asString = scoreObj.toString();
+ } else if (scoreObj instanceof byte[]) {
+ asString = new String((byte[]) scoreObj, java.nio.charset.StandardCharsets.US_ASCII);
+ } else if (scoreObj instanceof java.nio.ByteBuffer) {
+ java.nio.ByteBuffer buffer = ((java.nio.ByteBuffer) scoreObj).duplicate();
+ byte[] bytes = new byte[buffer.remaining()];
+ buffer.get(bytes);
+ asString = new String(bytes, java.nio.charset.StandardCharsets.US_ASCII);
+ }
+
+ if (asString != null) {
+ try {
+ return Double.valueOf(asString);
+ } catch (NumberFormatException e) {
+ LOG.warn("Failed to parse FT.SUGGET score '{}'", asString, e);
+ return null;
+ }
+ }
+
+ LOG.warn("Unsupported FT.SUGGET score type: {}", scoreObj.getClass());
+ return null;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| private Double parseScore(Object scoreObj) { | |
| if (scoreObj == null) { | |
| return null; | |
| } | |
| if (scoreObj instanceof Double) { | |
| return (Double) scoreObj; | |
| } | |
| return 0.0; | |
| } | |
| private Double parseScore(Object scoreObj) { | |
| if (scoreObj == null) { | |
| return null; | |
| } | |
| if (scoreObj instanceof Number) { | |
| return ((Number) scoreObj).doubleValue(); | |
| } | |
| String asString = null; | |
| if (scoreObj instanceof CharSequence) { | |
| asString = scoreObj.toString(); | |
| } else if (scoreObj instanceof byte[]) { | |
| asString = new String((byte[]) scoreObj, java.nio.charset.StandardCharsets.US_ASCII); | |
| } else if (scoreObj instanceof java.nio.ByteBuffer) { | |
| java.nio.ByteBuffer buffer = ((java.nio.ByteBuffer) scoreObj).duplicate(); | |
| byte[] bytes = new byte[buffer.remaining()]; | |
| buffer.get(bytes); | |
| asString = new String(bytes, java.nio.charset.StandardCharsets.US_ASCII); | |
| } | |
| if (asString != null) { | |
| try { | |
| return Double.valueOf(asString); | |
| } catch (NumberFormatException e) { | |
| LOG.warn("Failed to parse FT.SUGGET score '{}'", asString, e); | |
| return null; | |
| } | |
| } | |
| LOG.warn("Unsupported FT.SUGGET score type: {}", scoreObj.getClass()); | |
| return null; | |
| } |
🤖 Prompt for AI Agents
In src/main/java/io/lettuce/core/search/SuggestionParser.java around lines 117
to 127, the parseScore method currently returns 0.0 for any non-Double input
which discards valid scores; update it to handle common RESP2/RESP3 types by: if
scoreObj is a Number call ((Number) scoreObj).doubleValue(); if it is a
CharSequence or String/byte[]/ByteBuffer convert to String (for ByteBuffer
decode to UTF-8) and parse with Double.parseDouble(); if parsing fails return
null and log a warning with the raw value and class to avoid silent data loss;
do not return 0.0 as a default.
Make sure that:
mvn formatter:formattarget. Don’t submit any formatting related changes.Summary by CodeRabbit