rejected execution of coordinating operation [coordinating_and_primary_bytes=92720288, replica_bytes=0, all_bytes=92720288, coordinating_operation_bytes=23180072, max_coordinating_and_primary_bytes=107374182]"}],"type":"es_rejected_execution_exception","reason":"rejected execution of coordinating operation [coordinating_and_primary_bytes=92720288, replica_bytes=0, all_bytes=92720288, coordinating_operation_bytes=23180072, max_coordinating_and_primary_bytes=107374182]
时间: 2024-01-24 10:18:44 浏览: 45
这个错误信息是来自于 Elasticsearch(ES)的,意味着 ES 拒绝执行一个协调操作。该错误通常表示系统资源不足,如内存或 CPU。具体而言,该错误信息显示了请求的操作和已使用的资源,以及 ES 可能允许的最大协调和主要字节数。
为了解决这个问题,你需要增加系统资源(如内存或 CPU)或调整 ES 集群的配置参数,以提高其性能。你可以尝试减少请求的字节数,或者增加集群中的节点来平衡负载。此外,你还可以将请求分割成更小的块,以减轻 ES 集群的负担。建议你查看 ES 的文档,了解如何优化集群性能。
相关问题
const resp = await USER_SELECT_BY_ID_API(userId);
这段代码使用了 await 关键字来等待 USER_SELECT_BY_ID_API(userId) 函数返回一个 Promise 对象的结果,并将结果赋值给 resp 变量。在此过程中,JavaScript 引擎会暂停当前函数的执行,直到 Promise 对象的状态变为 resolved 或 rejected。
如果 Promise 对象成功地被 resolved,await 表达式的值将设置为返回的数据;如果 Promise 对象被 rejected,则 await 表达式会抛出一个错误,需要用 try-catch 语句来捕获这个错误。
需要注意的是,使用 await 关键字的函数必须在函数前面添加 async 关键字来表明这个函数是异步函数。
update mc_tax_apply set rejected_time = null,remark = null where apply_id = 用MyBatisPlus怎么写
使用 MyBatisPlus 进行更新操作可以通过以下步骤实现:
1. 定义实体类
首先需要定义实体类 `McTaxApply`,该类需要继承 `Model` 类,并且定义实体类的属性对应数据库表的字段。
```java
public class McTaxApply extends Model<McTaxApply> {
private Long applyId;
private Date rejectedTime;
private String remark;
// 省略 getter 和 setter 方法
}
```
2. 定义 Mapper 接口
接下来需要定义 Mapper 接口 `McTaxApplyMapper`,该接口需要继承 `BaseMapper` 接口,并且定义更新操作的方法。
```java
public interface McTaxApplyMapper extends BaseMapper<McTaxApply> {
int updateRejectedTimeAndRemarkById(@Param("applyId") Long applyId,
@Param("rejectedTime") Date rejectedTime,
@Param("remark") String remark);
}
```
其中 `@Param` 注解用于指定参数名称,方便在 SQL 语句中使用。
3. 定义 SQL 语句
在 XML 文件中定义 SQL 语句,该语句需要使用 MyBatisPlus 提供的 `UpdateWrapper` 来进行更新操作。
```xml
<update id="updateRejectedTimeAndRemarkById">
update mc_tax_apply
<set>
<if test="rejectedTime != null">
rejected_time = #{rejectedTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where apply_id = #{applyId,jdbcType=BIGINT}
</update>
```
4. 调用更新方法
在代码中调用更新方法,实现更新操作。
```java
McTaxApply mcTaxApply = new McTaxApply();
mcTaxApply.setApplyId(1L);
mcTaxApply.setRejectedTime(null);
mcTaxApply.setRemark(null);
McTaxApplyMapper mcTaxApplyMapper = sqlSession.getMapper(McTaxApplyMapper.class);
int result = mcTaxApplyMapper.update(mcTaxApply, new UpdateWrapper<McTaxApply>()
.eq("apply_id", mcTaxApply.getApplyId())
.set("rejected_time", mcTaxApply.getRejectedTime())
.set("remark", mcTaxApply.getRemark()));
```
以上代码中,我们首先创建了一个 `McTaxApply` 对象,并设置了需要更新的字段。然后通过 `SqlSession` 获取 `McTaxApplyMapper` 接口的实现类,并调用更新方法。在更新方法中,我们使用 `UpdateWrapper` 来构造更新条件和更新字段,并通过 `eq` 方法指定更新条件为 `apply_id = ?`。最后执行更新操作,并返回更新结果。