We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FastEvent 中Order Trade等对象都是预先New分配的,在CoreEngineServiceImpl类中onOrder方法直接使用 orderMap.put(order.getRtOrderID(), order); 缓存该Order。 这会导致如果RingBuf重复使用的时候, orderMap之前的order的值会被后续的事件给修改掉。虽然你目前缓存buf是65536 , 对于order没有类似问题, 但对于tick可能会有隐患。
The text was updated successfully, but these errors were encountered:
@hetinggithub 是的,可能有此隐患,由于目前系统中事件类型都比较确定,事件发出的情形和字段填充的方式一致,旧值会被覆盖,且事件消费速度大于事件产生速度,RingBuf的事件没有被长时间引用的场景,所以这个问题没有触发。在未发布的新版本中由于使用了protobuf,不再使用类似于字段传值的onXXX方法。但显然,RingBuf的事件对象实例依然应该避免被其他线程长时间引用。
Sorry, something went wrong.
No branches or pull requests
FastEvent 中Order Trade等对象都是预先New分配的,在CoreEngineServiceImpl类中onOrder方法直接使用 orderMap.put(order.getRtOrderID(), order);
缓存该Order。
这会导致如果RingBuf重复使用的时候, orderMap之前的order的值会被后续的事件给修改掉。虽然你目前缓存buf是65536 , 对于order没有类似问题, 但对于tick可能会有隐患。
The text was updated successfully, but these errors were encountered: