Commit 3b4dd64e authored by unknown's avatar unknown
Browse files

ndb - bug#21535

  send new fragdistkeys to all replicas during node recovery
  to make sure that not 3rd or 4th replicas fragDistKey becomes out of sync


ndb/include/kernel/GlobalSignalNumbers.h:
  new signal UpdateFragDistKeyOrd
ndb/include/kernel/signaldata/CopyFrag.hpp:
  new signal UpdateFragDistKeyOrd
ndb/include/ndb_version.h.in:
  online software upgrade for new signal UpdateFragDistKeyOrd
ndb/src/common/debugger/signaldata/SignalNames.cpp:
  new signal UpdateFragDistKeyOrd
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Send noew list of all replicas in copyfragreq
ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  new signal UpdateFragDistKeyOrd
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp:
  new signal UpdateFragDistKeyOrd
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  new signal UpdateFragDistKeyOrd
parent ba0d1529
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
/* 68 unused */
/* 69 unused */
/* 70 unused */
#define GSN_UPDATE_FRAG_DIST_KEY_ORD    70
#define GSN_ACC_ABORTREQ                71
#define GSN_ACC_CHECK_SCAN              72
#define GSN_ACC_COMMITCONF              73
+13 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ class CopyFragReq {
   */
  friend class Dblqh;
public:
  STATIC_CONST( SignalLength = 7 );
  STATIC_CONST( SignalLength = 8
 );

private:
  Uint32 userPtr;
@@ -40,6 +41,8 @@ private:
  Uint32 nodeId;
  Uint32 schemaVersion;
  Uint32 distributionKey;
  Uint32 nodeCount;
  Uint32 nodeList[1];
};

class CopyFragConf {
@@ -84,4 +87,13 @@ private:
  Uint32 errorCode;
};

struct UpdateFragDistKeyOrd
{
  Uint32 tableId;
  Uint32 fragId;
  Uint32 fragDistributionKey;

  STATIC_CONST( SignalLength = 3 );
};

#endif
+2 −0
Original line number Diff line number Diff line
@@ -62,5 +62,7 @@ char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ];

#define NDBD_DICT_LOCK_VERSION_5 MAKE_VERSION(5,0,23)

#define NDBD_UPDATE_FRAG_DIST_KEY_50 MAKE_VERSION(5,0,26)
#define NDBD_UPDATE_FRAG_DIST_KEY_51 MAKE_VERSION(5,1,12)
#endif
 
+2 −1
Original line number Diff line number Diff line
@@ -637,5 +637,6 @@ const GsnName SignalNames [] = {
  ,{ GSN_DICT_LOCK_REF,          "DICT_LOCK_REF" }
  ,{ GSN_DICT_UNLOCK_ORD,        "DICT_UNLOCK_ORD" }

  ,{ GSN_UPDATE_FRAG_DIST_KEY_ORD, "UPDATE_FRAG_DIST_KEY_ORD" }
};
const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName);
+4 −1
Original line number Diff line number Diff line
@@ -3078,7 +3078,10 @@ void Dbdih::execCREATE_FRAGCONF(Signal* signal)
    copyFragReq->nodeId = takeOverPtr.p->toStartingNode;
    copyFragReq->schemaVersion = tabPtr.p->schemaVersion;
    copyFragReq->distributionKey = fragPtr.p->distributionKey;
    sendSignal(ref, GSN_COPY_FRAGREQ, signal, CopyFragReq::SignalLength, JBB);
    copyFragReq->nodeCount = extractNodeInfo(fragPtr.p, 
					     copyFragReq->nodeList);
    sendSignal(ref, GSN_COPY_FRAGREQ, signal, 
	       CopyFragReq::SignalLength +  copyFragReq->nodeCount, JBB);
  } else {
    ndbrequire(takeOverPtr.p->toMasterStatus == TakeOverRecord::COMMIT_CREATE);
    jam();
Loading