Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix return_one_result flag not return one result #110

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

eemjwu
Copy link
Contributor

@eemjwu eemjwu commented Mar 11, 2024

Summary

fix return_one_result flag not return one result

Solution Description

When returning the package, merge the results of each partition.

if (returnOneResult) {
if (results[0] == null) {
results[0] = new ObTableOperationResult();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to accumulate affected_rows when the table operation spans two or more tablet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
ObTableOperationType lastType = operations.get(0).getOperationType();
if (returnOneResult
&& !(batchOperation.isSameType() && (lastType == ObTableOperationType.INSERT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this defensive code to the interface layer, which will be more readable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@shenyunlong shenyunlong merged commit 33e132e into oceanbase:perf_opt Mar 13, 2024
3 checks passed
@eemjwu eemjwu deleted the result_one branch March 18, 2024 06:51
WeiXinChan added a commit that referenced this pull request Mar 25, 2024
* 增加same_property_names判断 (#79)

* properties name ignor case

---------

Co-authored-by: wumengjie.wmj <[email protected]>

* support put operation (#80)

* add option flag, batch operations can return one res (#94)

* fix test case, in return one result (#97)

* add option flag, batch operations can return one res

* fix return one result test

* add tests (#103)

* support batch put (#107)

* fix batch put use correct api (#108)

* support batch put

* fix batch put use put method

* atomic can across partition

* [Feat] batchOperation support LSOp (#105)

* [Feat] support LS batch routing

* [Feat] single operation adapt to ObTableLSOp

* [Test] add test for LS batch

* [Enhancement] add get operation test for LsOp and fix bugs

* [Test] add test cases for ObTableLSOp

* [Test] add batch put test for ObTableLSOp

* [Fix] add defensive code to disallow mix checkAndInsUp and other types operation

* [OBKV] ObTableLsOp adapt to returnOneResult

* [Fix] modify accord to review

* fix return_one_result flag not return one result (#110)

* fix return_one_result flag not return one result

* fix review

* [Fix] adapt to lob-related table object type (#113)

* [Fix] adapt to lob-related table object type

* [Fix] set ObLsOp tableName for ODP mode

* Fix prv tenantid always 1 (#114)

* fix prv_tenantid always 1

* add BatchGet test case

* [Fix] isSamePropertiesNames flag is wrong in ObTableTabletOp (#118)

* fix review comment

---------

Co-authored-by: eemjwu <[email protected]>
Co-authored-by: wumengjie.wmj <[email protected]>
Co-authored-by: xiaoai <[email protected]>
Co-authored-by: Shen Yunlong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants