EnyimMemcachedCore 中主要修改的代码如下:
1)OpCode 中添加了
Touch = 0x1C
2)StoreOperation 中添加了
case StoreMode.Touch: op = OpCode.Touch; break;
3)StoreOperationBase 在添加了
case StoreCommand.Touch: sb.Append("touch "); break;
4)MemcachedClient 的 PerformStoreAsync 方法中添加了
if (mode == StoreMode.Touch)
{
value = "";
}
运行 memcached 服务器返回错误 "Invalid arguments (4)"
tcp 抓包情况
请求:
Memcache Protocol, Unknown opcode (28) Request
Magic: Request (128)
Opcode: Unknown (28)
[Expert Info (Warning/Undecoded): Unknown opcode: 28]
[Unknown opcode: 28]
[Severity level: Warning]
[Group: Undecoded]
Key Length: 71
Extras length: 8
Data type: Raw bytes (0)
Reserved: 0
[Value length: 0]
Total body length: 79
Opaque: 2
CAS: 0
Extras
Unknown: 0000011200000014
Key: store_unit_test_636943328034572374_133f5e42-54ce-41e2-bc65-c6a55f2d4d90
响应:
Memcache Protocol, Unknown opcode (28) Response
Magic: Response (129)
Opcode: Unknown (28)
[Expert Info (Warning/Undecoded): Unknown opcode: 28]
[Unknown opcode: 28]
[Severity level: Warning]
[Group: Undecoded]
Key Length: 0
Extras length: 0
Data type: Raw bytes (0)
Status: Invalid arguments (4)
[Expert Info (Note/Response): Unknown opcode (28): Invalid arguments]
[Unknown opcode (28): Invalid arguments]
[Severity level: Note]
[Group: Response]
[Value length: 17]
Total body length: 17
Opaque: 2
CAS: 0
Value: Invalid arguments
请问如何解决?
相关问题
- WPF中click事件无效怎么解决
- memory leak Microsoft.Extensions.Logging asp.net c
- Skip()函数和Take()函数不起作用
- Entity Framework Core如何设置3个表联合查询(Join)
- ASP.NET Core 中如何通过 Response Header 返回容器 ID
相关文章
- WPF中click事件无效怎么解决
- memory leak Microsoft.Extensions.Logging asp.net c
- Skip()函数和Take()函数不起作用
- Entity Framework Core如何设置3个表联合查询(Join)
- ASP.NET Core 中如何通过 Response Header 返回容器 ID
- 新建.net core MVC 视图和控制器项目,运行时services.AddMvc()报错
- 单元测试的方法中,有对Redis进行数据增删改的操作,如何过滤掉方法内的Redis操作(避免影响实际
- .net core 巨大的请求量会报读取错误吗?如下
解决了,不应该基于 StoreOperation 实现,而是要基于 MutatorOperation
在 MutatorOperation.UpdateExtra() 方法中添加了下面的实现代码