删除执行结果返回成功
DeleteResponse[index=awaitz-prod-goods,type=_doc,id=712810048943927296,version=1435,result=deleted,shards=ShardInfo{total=1, successful=1, failures=}]
但是实际数据仍然在es中存在,并且可以查询到。此问题偶现,频率不高。
相关执行代码块:(主体方法是使用异步@Async,但是es删除代码块已经使用分布式锁)
DeleteRequest deleteRequest=new DeleteRequest();
deleteRequest.index(esServerProperties.getIndexName().getGoods());
deleteRequest.id(goodsId.toString());
deleteRequest.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
DeleteResponse deleteResult =restHighLevelClient.delete(deleteRequest,RequestOptions.DEFAULT);