github-actions[bot] commented on code in PR #69153:
URL: https://github.com/apache/doris/pull/69153#discussion_r4290306023


##########
be/test/storage/rowset/beta_rowset_test.cpp:
##########
@@ -745,6 +750,36 @@ TEST_F(BetaRowsetTest, GetSegmentNumRowsRetryAfterFailure) 
{
     sp->clear_trace();
 }
 
+TEST_F(BetaRowsetTest, RowsetReaderConvertsCachedStdExceptionToStatus) {
+    auto tablet_schema = std::make_shared<TabletSchema>();
+    create_tablet_schema(tablet_schema);
+
+    auto rowset_meta = std::make_shared<RowsetMeta>();
+    init_rs_meta(rowset_meta, 1, 1);
+    auto rowset = std::make_shared<BetaRowset>(tablet_schema, rowset_meta, "");
+    BetaRowsetReader reader(rowset);
+    RowsetReaderContext context;
+    ASSERT_TRUE(reader.init(&context, {}).ok());
+
+    const auto old_enable_debug_points = config::enable_debug_points;
+    config::enable_debug_points = true;
+    const auto debug_point = 
"fault_inject::BetaRowsetReader::_init_iterator.throw_std_exception";
+    DebugPoints::instance()->add_with_params(debug_point, {{"execute_limit", 
"1"}});

Review Comment:
   [P2] Set the debug point's execution limit directly
   
   `add_with_params()` only fills `DebugPoint::params`; it does not assign 
`DebugPoint::execute_limit`, which remains `-1`. The fault therefore keeps 
throwing on every invocation. Both assertions would still pass if 
`_init_iterator()` were accidentally retried, so this does not establish the 
intended cached-exception behavior. Register a `DebugPoint` with `execute_limit 
= 1` via `add()`, or remove the fault after the first call, so the second call 
must obtain the cached exception.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to