You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/31 22:29:00 UTC

[jira] [Commented] (KUDU-3437) Starting Master server runs into error first time

    [ https://issues.apache.org/jira/browse/KUDU-3437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707435#comment-17707435 ] 

ASF subversion and git services commented on KUDU-3437:
-------------------------------------------------------

Commit e07c941aa6622efb758283cb2a583d0b90deb830 in kudu's branch refs/heads/master from Ádám Bakai
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=e07c941aa ]

KUDU-3437 Set default block_cache_metrics_policy to reset

If the master has empty local directories and connects to an existing
cluster, it executes Master::Init twice, which executes
StartInstrumentation twice, which is only allowed if it's a test or the
policy is to reset the existing CacheMetrics. According to documentation
ExistingMetricsPolicy::kKeep should only be used during tests, so the
default value is set to kReset which fixes the original issue.

Change-Id: Idc32d7ab02201382debcbe36311579550353bf71
Reviewed-on: http://gerrit.cloudera.org:8080/19585
Tested-by: Kudu Jenkins
Reviewed-by: Yuqi Du <sh...@gmail.com>
Reviewed-by: Alexey Serbin <al...@apache.org>


> Starting Master server runs into error first time
> -------------------------------------------------
>
>                 Key: KUDU-3437
>                 URL: https://issues.apache.org/jira/browse/KUDU-3437
>             Project: Kudu
>          Issue Type: Bug
>          Components: cfile
>         Environment: Macos 13.0.1 Arm64, fastdebug build
>            Reporter: Bakai Ádám
>            Assignee: Bakai Ádám
>            Priority: Major
>
> Reproduction script:
> {noformat}
> #Please make sure that stop_kudu.sh and start_kudu.sh and kudu command is in your path to run this script.
> export PATH=$PATH:./bin/
> stop_kudu.sh;rm -rf master-*; mkdir -p master-3/data master-3/wal master-3/log; start_kudu.sh -m 3
> echo just to make sure it returns three masters as expected
> kudu master list localhost:8764,localhost:8766,localhost:8768
> echo This returns error:
> kudu-master --master_addresses=127.0.0.1:8764,127.0.0.1:8766,127.0.0.1:8768,localhost:8770 --fs_data_dirs=$PWD/master-3/data --fs_wal_dir=$PWD/master-3/wal --log_dir=$PWD/master-3/log --rpc_bind_addresses=127.0.0.1:8770 --time_source=system_unsync --unlock_unsafe_flags --webserver_interface=127.0.0.1 --webserver_port=8771
> echo just to make sure it returns three masters
> kudu master list localhost:8764,localhost:8766,localhost:8768
> echo Now it should be running fine:
> kudu-master --master_addresses=127.0.0.1:8764,127.0.0.1:8766,127.0.0.1:8768,localhost:8770 --fs_data_dirs=$PWD/master-3/data --fs_wal_dir=$PWD/master-3/wal --log_dir=$PWD/master-3/log --rpc_bind_addresses=127.0.0.1:8770 --time_source=system_unsync --unlock_unsafe_flags --webserver_interface=127.0.0.1 --webserver_port=8771 &
> sleep 2 
> echo just to make sure it returns four masters
> kudu master list localhost:8764,localhost:8766,localhost:8768
>  {noformat}
> My error for the first run:
> {code:java}
> F20230127 15:58:28.923543 360774 cache.cc:579] Check failed: IsGTest() Metrics should only be set once per Cache
> *** Check failure stack trace: ***
>     @        0x1025950d4  google::LogMessageFatal::~LogMessageFatal()
>     @        0x102591930  google::LogMessageFatal::~LogMessageFatal()
>     @        0x10b56c4a8  kudu::(anonymous namespace)::ShardedCache<>::SetMetrics()
>     @        0x103522c1c  kudu::cfile::BlockCache::StartInstrumentation()
>     @        0x101249230  kudu::master::Master::Init()
>     @        0x10126cbf0  kudu::master::RunMasterServer()
>     @        0x1005eae64  kudu::master::MasterMain()
>     @        0x1005ead10  main {code}
>  If I uncomment the line
> {code:java}
> CHECK(IsGTest()) << "Metrics should only be set once per Cache";
>  {code}
> from kudu/util/cache.cc:579  it seems to work fine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)