wangbo commented on a change in pull request #1944: Segment v2 use string's 
real length(#1943)
URL: https://github.com/apache/incubator-doris/pull/1944#discussion_r333915743
 
 

 ##########
 File path: be/src/olap/field.h
 ##########
 @@ -55,9 +55,11 @@ class Field {
     inline size_t field_size() const { return size() + 1; }
     inline size_t index_size() const { return _index_size; }
 
-    inline void set_to_max(char* buf) const { return 
_type_info->set_to_max(buf); }
+    virtual inline void set_to_max(char* buf) const { return 
_type_info->set_to_max(buf); }
+    //todo delete this method when segment v2 release
+    inline void set_to_max_v1(char* buf) const { return 
_type_info->set_to_max(buf); }
 
 Review comment:
   when memset a char array to 0xff,if the length of memset is gt than the char 
array's real length,this may cause subsequently tcmalloc core dump,So I think 
it's better to memset using char array's real length. core dumped as below:
   
   >#0  SLL_Next (t=0x985ca2758b7b4b00) at src/linked_list.h:45
   >#1  SLL_TryPop (rv=<synthetic pointer>, list=0x403ece0) at 
src/linked_list.h:69
   >#2  TryPop (rv=<synthetic pointer>, this=0x403ece0) at 
src/thread_cache.h:220
   >#3  Allocate (oom_handler=0x25e8f00 <tcmalloc::cpp_throw_oom(unsigned 
long)>, cl=5, size=64, this=<optimized out>) at src/thread_cache.h:379
   >#4  malloc_fast_path<tcmalloc::cpp_throw_oom> (size=size@entry=64) at 
src/tcmalloc.cc:1855
   >#5  tc_new (size=size@entry=64) at src/tcmalloc.cc:1976
   >#6  0x000000000119ba04 in doris::RowBlock::RowBlock (this=0x4894820, 
schema=<optimized out>)
   >    at /home/wangbo/incubator-doris/be/src/olap/row_block.cpp:44
   >#7  0x0000000000cbc5ad in doris::ColumnDataWriter::init (this=0x4894780) at 
/home/wangbo/incubator-doris/be/src/olap/rowset/column_data_writer.cpp:82
   >#8  0x0000000000ca5d1c in doris::AlphaRowsetWriter::_init 
(this=this@entry=0x48c8500)
   >    at 
/home/wangbo/incubator-doris/be/src/olap/rowset/alpha_rowset_writer.cpp:275
   >#9  0x0000000000ca71b2 in doris::AlphaRowsetWriter::init (this=0x48c8500, 
rowset_writer_context=...)
   >    at 
/home/wangbo/incubator-doris/be/src/olap/rowset/alpha_rowset_writer.cpp:73
   >#10 0x0000000000c94df3 in doris::RowsetFactory::create_rowset_writer 
(context=..., output=output@entry=0x7fff27799208)
   >    at /home/wangbo/incubator-doris/be/src/olap/rowset/rowset_factory.cpp:50
   >#11 0x0000000000bc711a in doris::TabletManager::_create_inital_rowset 
(this=this@entry=0x4a2a180, tablet=..., request=...)
   >    at /home/wangbo/incubator-doris/be/src/olap/tablet_manager.cpp:1250
   >#12 0x0000000000bca139 in doris::TabletManager::_internal_create_tablet 
(this=this@entry=0x4a2a180, alter_type=alter_type@entry=doris::SCHEMA_CHANGE, 
   >    request=..., 
is_schema_change_tablet=is_schema_change_tablet@entry=false, ref_tablet=..., 
data_dirs=...)
   >    at /home/wangbo/incubator-doris/be/src/olap/tablet_manager.cpp:371
   >#13 0x0000000000bcb592 in doris::TabletManager::create_tablet 
(this=this@entry=0x4a2a180, request=..., stores=...)
   >    at /home/wangbo/incubator-doris/be/src/olap/tablet_manager.cpp:318
   >#14 0x0000000000b7fc32 in doris::StorageEngine::create_tablet 
(this=<optimized out>, request=...)
   >    at /home/wangbo/incubator-doris/be/src/olap/storage_engine.cpp:760
   >#15 0x0000000000b4f97c in doris::TestDeleteConditionHandler::SetUp 
(this=0x4af2540)
   >    at /home/wangbo/incubator-doris/be/test/olap/delete_handler_test.cpp:173
   >#16 0x0000000002534737 in void 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) ()
   >#17 0x000000000252f29c in void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) ()
   >#18 0x00000000025145f7 in testing::Test::Run() ()
   >#19 0x0000000002514ece in testing::TestInfo::Run() ()
   >#20 0x0000000002515525 in testing::TestCase::Run() ()
   >#21 0x000000000251c099 in testing::internal::UnitTestImpl::RunAllTests() ()
   >#22 0x00000000025356b3 in bool 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) ()
   >#23 0x000000000252ffa2 in bool 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) ()
   >#24 0x000000000251ad70 in testing::UnitTest::Run() ()
   >#25 0x00000000009fb5f6 in RUN_ALL_TESTS () at 
/home/wangbo/incubator-doris/thirdparty/installed/include/gtest/gtest.h:2233
   >#26 main (argc=<optimized out>, argv=0x7fff27799e78) at 
/home/wangbo/incubator-doris/be/test/olap/delete_handler_test.cpp:951

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to