apache / apache/servicecomb-java-chassis

在org.apache.servicecomb.common.rest.RestEngineSchemaListener注册之前 kafka消费消息调用接口,导致后续调用该接口都报空指针异常

Open
#3,240 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

```
2022-07-28 14:36:45.020|[]|mock-thread|WARN |SCBEngine.java:513|The request is rejected. Cannot process the request due to STATUS = STARTING
2022-07-28 14:36:45.020|[]|mock-thread|WARN |VehicleTaskEndListener.java:64|clear busyTag of [335157342402481152] failed
2022-07-28 14:36:45.215|[]|mock-thread|INFO |MicroserviceVersions.java:93|create MicroserviceVersions, appId=mockAppId, microserviceName=mockMicro.
2022-07-28 14:36:46.125|[]|main|INFO |SCBEngine.java:630|instance registry succeeds for the first time, will send AFTER_REGISTRY event.
```

`create MicroserviceVersions`日志打印早于`instance registry succeeds for the first time`

通过日志上下文可以确定这个日志是调用一个@RpcReference的接口触发的。但是按理`currentStatus` 不为UP调用接口应该会抛错。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with SCBEngine.java around the STARTING status check and the first instance registry event, then trace the Kafka consumer path that invokes the @RpcReference interface before RestEngineSchemaListener is registered. Use the supplied log ordering to reproduce the lifecycle race. Done means the early call is handled consistently and later calls no longer fail with a null pointer exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kafka
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.