[MCOL-1001] WES client code will not work if a middle PM is removed Created: 2017-11-01  Updated: 2022-11-05  Resolved: 2022-11-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: writeengine
Affects Version/s: 1.1.0
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: David Hill (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None


 Description   

In debugging for another BUG, ran across this code. It will be a problem if as an example PM2 is removed from the configuration on a PM1 - PM3 system.

Code just gets the number of configured PMs, then tried to communicate to them in a loop that starts at 1 and goes to number-of-pms.

void WEClients::Setup()
{
makeBusy(true);
joblist::ResourceManager *rm = joblist::ResourceManager::instance();
oam::Oam oam;
string ipAddress;
ModuleTypeConfig moduletypeconfig;
try

{ oam.getSystemConfig("pm", moduletypeconfig); }

catch (...)

{ writeToLog(__FILE__, __LINE__, "oam.getSystemConfig error, unknown exception", LOG_TYPE_ERROR); throw runtime_error("Setup failed"); }

uint32_t pmCountConfig = moduletypeconfig.ModuleCount;
pmCount = 0;
int moduleID = 1;

char buff[32];
ByteStream bs, bsRead;
if (fPrgmID == DDLPROC)

{ bs << (ByteStream::byte) WE_SVR_DDL_KEEPALIVE; bs << (ByteStream::octbyte) moduleID; }

else if (fPrgmID == DMLPROC)

{ bs << (ByteStream::byte) WE_SVR_DML_KEEPALIVE; bs << (ByteStream::octbyte) moduleID; }

else if (fPrgmID == SPLITTER)

{ bs << (ByteStream::byte) WE_CLT_SRV_KEEPALIVE; }

else if (fPrgmID == BATCHINSERTPROC)

{ bs << (ByteStream::byte) WE_SVR_BATCH_KEEPALIVE; bs << (ByteStream::octbyte) moduleID; }

for (unsigned i = 0; i < pmCountConfig; i++) {



 Comments   
Comment by David Hill (Inactive) [ 2017-11-01 ]

Also in this same code...

Should this runtime error happen? In the case where it gets this error when communicating to pm2 when pm1 and pm3 are up. Seems like it should log and continue..

} else

{ throw runtime_error("Connection refused"); }
Comment by David Hill (Inactive) [ 2017-11-01 ]

And will pmCount work like we want if pm2 is down while pm1 and pm3 are up.

void WEClients::addQueue(uint32_t key)
{
bool b;

mutex* lock = new mutex();
condition* cond = new condition();
boost::shared_ptr<MQE> mqe(new MQE(pmCount));

Comment by Todd Stoffel (Inactive) [ 2022-11-05 ]

This item is being closed because it was well passed the expiration date with no activity. If you suspect this was done in error please create a new ticket.

Generated at Thu Feb 08 02:25:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.