Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4.After query coord successfully loads sealed segments on querynode, update the sealed segments list of each querynode in cache meta. For example, after balancing sealed segment 8 from node 1 node 2, the meta of node1 changes from {S6, S7,S8} to { S6, S7}, node2's meta is changed from {S5} to {S5, S8}. If the query node suddenly goes down, directly follow the meta records of the coord to recover the query node. While querycoord updates the meta, it broadcasts sends a change info of sealed segments to querychannel. The proto of sealed segments change info is as follows:

Code Block
languagepy
message SealedSegmentsChangeInfo {
 common.MsgBase base = 1;
 int64 online_nodeID = 2;
 repeated SegmentInfo online_segments = 3;
 int64 offline_nodeID = 4;
 repeated SegmentInfo offline_segments = 5;
}

5.Query coord updates querychannelInfo in meta, mainly updating two content, one is global sealed segments, for example, after handoff growing segment S3, global sealed segments change from {S5, S6, S7, S8} to {S3, S5, S6 , S7, S8}, the other is seek_position, that is, the position of the previous SealedSegmentsChangeInfo in the querychannel. Each query node will receive these two initialization parameters when the querychannel is watched. This ensures that when the specified query message is processed , The global sealed segments received by all querynodes are consistent.

Code Block
languagepy
message QueryChannelInfo {
 int64 collectionID = 1;
 string query_channelID = 2;
 string query_result_channelID = 3;
 repeated SegmentInfo global_sealed_segments = 4;
 internal.MsgPosition seek_position = 5;
}

6.query coord 更新meta中的querychannelInfo,After querynode consumes SealedSegmentsChangeInfo from querychannel, it will do the following three things:

  • Update the list of gloabal sealed segments in the query collection according to online_segments and offline_segments in SealedSegmentsChangeInfo
  • If the growing segment ID in streaming appears in the list of global sealed segments, clear the corresponding growing segments from streaming module
  • If the current nodeID==offline_nodeID, clear the sealed segments in offline_segments from historical module


Test Plan

  • Unit tests

  • CI tests