Missing rules when using expirable maps/caches from popular open source libraries
还没有人认领这个 Issue。
评估
调研方向
首先定位仓库中与 SnapStart 相关警告对应的 Java 规则定义和测试。检查各项检查如何识别库和方法的使用,然后覆盖 Guava expireAfterAccess/expireAfterWrite 以及 ExpiringMap 的过期变体。完成标准是相关的可过期缓存模式会产生警告,同时非过期缓存的使用不受影响。
由索引模型根据 Issue 内容生成。
描述
In case the expirable cache is initialized in the constructor of the Lambda class and some entries are put as well it may happen that the entries are not there anymore after the SnapStart snapshot is restored. The should be a warning of usage of time-based cached with the SnapStart is enabled.
In particular I'm thinking of the usage of 2 popular open source libraries:
- Google Guava ( artifact id guava and group id com.google.guava) and the code like this
myCache = CacheBuilder.newBuilder().expireAfterAccess(3600, TimeUnit.SECONDS) .build();
myCache.put("key", "value");
- Using artifact id expiringmap and the group id net.jodah and the code like this
expiredMap = ExpiringMap.builder().expiration(3600, TimeUnit.SECONDS).build();
expiredMap.put("key", "value");
I know that it's difficult to spot such use cases because both open source libraries offer standard and not expirable caches. But the invocation of the methods like CacheBuilder.newBuilder().expireAfterAccess/expireAfterWrite or multiple variations of methods ExpiringMap.builder().expiration* when creating the cache using these open source tools is a clear indication of the creation of expirable cache.
- 主要语言
- Java
- 星标
- 53
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-lambda-snapstart-java-rules 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
aws/aws-lambda-snapstart-java-rules#35 · 1 条评论 ·
查看 aws/aws-lambda-snapstart-java-rules 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
infinispan/infinispan#18150 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
untriaged
难度 2/5 1-3 小时 新手友好度 82/100
opensearch-project/k-NN#3597 ·
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100