[MCOL-1148] Multi server separated out in different data centers and geographic locations Created: 2018-01-08  Updated: 2021-01-17  Resolved: 2021-01-17

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.1.3
Fix Version/s: 5.5.1

Type: New Feature Priority: Minor
Reporter: Sasha V Assignee: Todd Stoffel (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Multi server separated out in two data centers and geographic locations



 Description   

According to the InfiniDB Concepts Guide, User and Performance Modules can be separated out in different data centers and geographic locations. Thus, I am hopeful that MariaDB ColumnStore could provide such feature.

As linuxjedi informed that there were several bugs in the network packet handling and compression that are fixed in the develop-1.1 branch (which will make up the 1.1.3 release), I deployed MariaDB ColumnStore from 1.1.3 repository (build of Jan 2) on three combined UM/PM nodes, with PM3 in a different geo-location separated by 25 ms of RTT from PM1/2 nodes. The system is loaded with 3M rows of data separated across all three PMs.

After a system start, a test data aggregation query works as expected and completes in 15-20s. However, after few days of system idling and no records in the logs, the same data aggregation query fails with

ERROR 1815 (HY000): Internal error: DistributedEngineComm::write: Broken Pipe error

having records in the /var/log/mariadb/columnstore/crit.log

Jan  8 13:31:42 pm-01 joblist[17132]: 42.993173 |24|0|0| C 05 CAL0000: DistributedEngineComm::write: Broken Pipe error
Jan  8 13:31:42 pm-01 joblist[17132]: 42.993849 |0|0|0| C 05 CAL0000: /data/buildbot/bb-worker/deb-ubuntu16/build/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/joblist/distributedenginecomm.cpp @ 382 DEC: lost connection to xx.xx.xx.xx

The same query executes fine following system shutdown/start.

How can I increase the log level verbosity to debug broken pipe and lost connection issues?



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-01-08 ]

For clarification my comment in the mailing list was talking about mcsapi only. This does not appear to be an mcsapi issue so my comment does not apply.

Comment by Sasha V [ 2018-01-10 ]

After several system shutdown/start cycles, the (unreleased) 1.1.3 system failed to start having

tail /usr/local/mariadb/columnstore/mysql/db/pm-01.err
 
2018-01-09 16:20:42 139938857060160 [ERROR] mysqld: File '/usr/local/mariadb/columnstore/mysql/db/ClientRotator caught exception: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 48 inet: xx.xx.xx.xx port: 8601' not found (Errcode: 2 "No such file or directory")
2018-01-09 16:20:42 139938857060160 [ERROR] Failed to open log (file '/usr/local/mariadb/columnstore/mysql/db/ClientRotator caught exception: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 48 inet: xx.xx.xx.xx port: 8601', errno 2)

Thanks to the clarification from linuxjedi, I downgraded the system from the (unreleased) 1.1.3 to release 1.1.2 GA.

It appears that the observed problem with a distributed system was caused by data centers firewalls that dropped idle connections. After implementing some kind of a keep-alive ping (a periodic execution of the same data aggregation query) the MariaDB ColumnStore 1.1.2 no longer reported broken pipe or lost connection issues.

Comment by Sasha V [ 2018-01-10 ]

The distributed multi-server system exhibits the following behavior, when on a combined UM/PM1 node I use mcsmysql to execute the same query (an then quit):

  • first execution is fast (~0.3s) and the ExeMgr on UM/PM1 node logs this query in debug.log
  • second execution is fast (~0.3s) and the ExeMgr on UM/PM2 node logs this query in debug.log
  • third execution is slow (~18s) and the ExeMgr on UM/PM3 node (in another data center) logs this query.

It appears that upon mcsmysql launch on UM/PM1 node there is a round-robin assignment of the UM/ExeMgr node responsible for the query. (If I remain in the mcsmysql prompt that has been assigned to the remote UM/PM3 node, each query execution remains slow.)

This behavior is in agreement with InifiniDB documentation on "Automatic round-robin distribution/scale-out of queries (based on connection id) across all UMs."

It is possible to bind the query execution to UM/ExeMgr on a particular UM/PM node?

Comment by Sasha V [ 2018-01-11 ]

The round-robin distribution of queries (based on connection id) across all UMs is hardcoded at
https://github.com/infinidb/infinidb/blob/master/dbcon/execplan/clientrotator.cpp#L238

As a workaround, I use a stored procedure that KILLs it's own connection if CONNECTION_ID%3 equals 2, since this corresponds to queries using ExeMgr in a remote data center.

Comment by David Thompson (Inactive) [ 2018-01-12 ]

hi sasha, there is an enhancement to productize this MCOL-499 but as a workaround you can modify the columnstore.xml to force the connection from mariadb to exemgr to be localhost.

1. stop the system using the stopsystem command
2. On PM1, edit the Columnstore.xml. There are sections for ExeMgr1 and ExeMgr2. You can change the IP address for both to 127.0.0.1. Effectively, the round-robin mechanism will send queries to the local node for execution
3. start the system using the start system command

The effect will be that the mysqld process will then always use the same exemgr process on the same host.

Comment by Sasha V [ 2018-01-12 ]

Hi dthompson,

Thanks a lot for the guidance. I changed the ExeMgr IP addresses to 127.0.0.1 on all three nodes. Following this change, the MariaDB Columstore system (distributed across two data centers) executes queries stably.

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