Bug 10636231- High version count for INSERT .. RETURNING statements with reason INST_DRTLD_MISMATCH

数据库版本:11.2.0.2.0

操作系统版本:windows 2008r2 64位

问题表现:cpu利用率高。

问题分析: 有6个进程活动其中5个在等待 latch :row cache objects 和1个library cache mutex  等待。

                    查询v$latchholder 没有查处holder,做systemstate dump 和 process dump。没找到holder。

                    --猜测:row cache library cache的等待可能跟绑定变量啊,sql共享 或bug等相关。

                    做awr报告,发现

         

 查询 v$sqlarea 查看,version_count 多的sqlid

  根据sqlid去判断为什么sql没有共享。


 INST_DRTLD_MISMATCH 引起的sql没有共享。查询metalin 发现为bug。

Bug 10636231 - High version count for INSERT .. RETURNING statements with reason INST_DRTLD_MISMATCH [ID 10636231.8]

于是根据提示下载 mos的11.2.0.2.0 的psu7.

补丁已经下载,等安装后查看效果。





<think>我们正在分析Spring MVC处理HTTP请求的调试日志,特别是针对一个POST请求到/api/version/check的DispatcherServlet日志。 根据用户的问题,我们需要提供DispatcherServlet在处理POST请求时的典型调试日志信息,并解释关键部分。 注意:由于实际日志可能因配置和版本而异,我们将描述典型的日志输出,并解释关键事件。 步骤: 1. 请求到达DispatcherServlet 2. 寻找处理器(HandlerMapping) 3. 执行处理器(HandlerAdapter) 4. 处理结果(ViewResolver等) 另外,用户提到了引用[1]中的内容,其中涉及@RequestMapping在类上的配置以及Spring MVC处理HTTP请求入参。 因此,在日志分析中,我们也要注意这些点。 典型日志(DEBUG级别)可能如下(我们使用伪日志格式,并解释每一部分): ``` DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/api/version/check] DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path /api/version/check DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Returning handler method [public com.example.Result com.example.Controller.checkVersion(com.example.VersionRequest)] DEBUG [http-nio-8080-exec-1] org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'controller' DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor - Read [class com.example.VersionRequest] as "application/json;charset=UTF-8" with [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@12345] DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Invoking request handler method: public com.example.Result com.example.Controller.checkVersion(com.example.VersionRequest) DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor - Writing [class com.example.Result] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@12345] DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.DispatcherServlet - Successfully completed request ``` 解释: 1. 第一行:DispatcherServlet开始处理POST请求到`/api/version/check`。 2. 第二行:`RequestMappingHandlerMapping`在查找处理该路径的处理器方法。 3. 第三行:找到对应的处理器方法,即`Controller`中的`checkVersion`方法,返回类型为`Result`,参数为`VersionRequest`。 4. 第四行:获取对应的控制器Bean(单例)。 5. 第五行:使用`RequestResponseBodyMethodProcessor`(配合Jackson消息转换器)将请求体(JSON)反序列化为`VersionRequest`对象。这里体现了Spring MVC处理HTTP请求入参(特别是@RequestBody)的过程[^1]。 6. 第六行:调用处理器方法。 7. 第七行:将处理器方法返回的`Result`对象序列化为JSON写入响应。 8. 第八行:由于返回的是@ResponseBody(或@RestController),所以没有视图,因此ModelAndView为null。 9. 第九行:请求处理完成。 注意:如果请求中有参数(比如路径变量、查询参数、表单数据等),日志中还会有相应的参数绑定记录。 另外,如果用户配置了拦截器(Interceptor),还会有拦截器相关日志,例如: ``` DEBUG [http-nio-8080-exec-1] org.springframework.web.servlet.handler.MappedInterceptor - MappedInterceptor with preHandle ``` 如何启用DispatcherServlet的DEBUG日志? 通常,在日志配置文件(如logback.xml或log4j2.xml)中设置: ```xml <logger name="org.springframework.web.servlet" level="DEBUG"/> ``` 或者,在Spring Boot的application.properties中: ```properties logging.level.org.springframework.web.servlet=DEBUG ``` 注意:启用DEBUG日志可能会产生大量输出,建议在调试时使用。 相关问题: 1. 如何解读Spring MVC的DispatcherServlet日志? 2. 在Spring MVC中,如何配置日志以查看详细的请求处理过程? 3. 当DispatcherServlet处理请求时,如何跟踪请求参数和响应结果? 4. Spring MVC中,如何自定义日志信息以记录特定的请求细节? 我们回答用户的问题时,需要结合用户之前的关注点(如HTTP请求入参处理)和日志中的关键步骤。</think>### Spring MVC DispatcherServlet POST请求调试日志分析 当DispatcherServlet处理POST请求`/api/version/check`时,典型的DEBUG级别日志如下(基于Spring 5.x): ```log DEBUG o.s.web.servlet.DispatcherServlet - POST "/api/version/check", parameters={}, headers={...} DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped to com.example.ApiController#checkVersion(...) DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Read [class com.example.VersionRequest] as "application/json" DEBUG o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Invoking 'checkVersion' in controller DEBUG o.s.w.s.m.m.a.HttpEntityMethodProcessor - Writing [VersionResponse(...)] DEBUG o.s.web.servlet.DispatcherServlet - Completed 200 OK ``` #### 关键日志解析: 1. **请求接收阶段** `DispatcherServlet`标识接收到的POST请求路径和参数: ```log POST "/api/version/check", parameters={}, headers={Content-Type: application/json,...} ``` 2. **处理器映射阶段** 通过`RequestMappingHandlerMapping`定位控制器方法: ```log Mapped to com.example.ApiController#checkVersion(...) ``` 这验证了控制器类上的`@RequestMapping("/api/version")`配置[^1] 3. **参数绑定阶段** `RequestResponseBodyMethodProcessor`处理请求体绑定: ```log Read [class com.example.VersionRequest] as "application/json" ``` 对应Spring MVC的HTTP请求入参处理机制[^1] 4. **方法执行阶段** 处理器适配器调用目标方法: ```log Invoking 'checkVersion' in controller ``` 5. **响应处理阶段** 使用`HttpEntityMethodProcessor`序列化响应体: ```log Writing [VersionResponse(...)] ``` 6. **请求完成** 最终返回HTTP状态码: ```log Completed 200 OK ``` #### 启用DEBUG日志的方法 在`application.properties`中添加: ```properties logging.level.org.springframework.web.servlet=DEBUG logging.level.org.springframework.web=TRACE # 更详细的参数绑定日志 ``` #### 常见问题排查点 - **404错误**:检查控制器类是否有`@RestController`和`@RequestMapping("/api/version")` - **400错误**:查看`RequestResponseBodyMethodProcessor`日志确认参数绑定失败原因 - **415错误**:检查请求头`Content-Type`是否匹配`@PostMapping(consumes="application/json")`
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值