|
@@ -87,11 +87,11 @@ public class RedisService implements Serializable {
|
|
|
for (Map.Entry<String, String> e : batch.entrySet()) {
|
|
for (Map.Entry<String, String> e : batch.entrySet()) {
|
|
|
// pipeline.setex(e.getKey(), expireSeconds, e.getValue());
|
|
// pipeline.setex(e.getKey(), expireSeconds, e.getValue());
|
|
|
// 压缩后的key,升级后进行替换
|
|
// 压缩后的key,升级后进行替换
|
|
|
- try {
|
|
|
|
|
- pipeline.setex(e.getKey(), expireSeconds, CompressionUtil.snappyCompress(e.getValue()));
|
|
|
|
|
- } catch (Exception ex) {
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // pipeline.setex(e.getKey(), expireSeconds, CompressionUtil.snappyCompress(e.getValue()));
|
|
|
|
|
+ // } catch (Exception ex) {
|
|
|
|
|
+ // }
|
|
|
|
|
+ //
|
|
|
try {
|
|
try {
|
|
|
String newKey = String.format("%s:v2", e.getKey());
|
|
String newKey = String.format("%s:v2", e.getKey());
|
|
|
pipeline.setex(newKey.getBytes(StandardCharsets.UTF_8), expireSeconds, CompressionUtil.snappyCompressV2(e.getValue()));
|
|
pipeline.setex(newKey.getBytes(StandardCharsets.UTF_8), expireSeconds, CompressionUtil.snappyCompressV2(e.getValue()));
|