You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/11/05 01:44:19 UTC
[incubator-doris] branch master updated: [Bug] Fix the nullptr of
core in schema change (#7003)
This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 1f19644 [Bug] Fix the nullptr of core in schema change (#7003)
1f19644 is described below
commit 1f196442f73136f21a40e7ba0a1c7bbbf00450dd
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Fri Nov 5 09:44:08 2021 +0800
[Bug] Fix the nullptr of core in schema change (#7003)
schema change fail as memory allocation fail on row block sorting, however, it should do internal sorting first before schema change fail as memory allocation fail on row block sorting in case there are enough memory after internal sorting.
---
be/src/olap/schema_change.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp
index 8b3fc49..3fe0daf 100644
--- a/be/src/olap/schema_change.cpp
+++ b/be/src/olap/schema_change.cpp
@@ -57,7 +57,7 @@ public:
explicit RowBlockSorter(RowBlockAllocator* allocator);
virtual ~RowBlockSorter();
size_t num_rows() {
- return _swap_row_block->capacity();
+ return _swap_row_block != nullptr ? _swap_row_block->capacity() : 0;
}
bool sort(RowBlock** row_block);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org