@@ -58,6 +58,10 @@ class ScanTabReq {
5858 UintR apiConnectPtr; // DATA 0
5959 UintR attrLenKeyLen; // DATA 1
6060 UintR requestInfo; // DATA 2
61+ /*
62+ Table ID. Note that for a range scan of a table using an ordered index,
63+ tableID is the ID of the index, not of the underlying table.
64+ */
6165 UintR tableId; // DATA 3
6266 UintR tableSchemaVersion; // DATA 4
6367 UintR storedProcId; // DATA 5
@@ -111,7 +115,11 @@ class ScanTabReq {
111115 l = Lock mode - 1 Bit 8
112116 h = Hold lock mode - 1 Bit 10
113117 c = Read Committed - 1 Bit 11
114- k = Keyinfo - 1 Bit 12
118+ k = Keyinfo - 1 Bit 12 If set, LQH will send back a KEYINFO20
119+ signal for each scanned row,
120+ containing information needed to
121+ identify the row for subsequent
122+ TCKEYREQ signal(s).
115123 t = Tup scan - 1 Bit 13
116124 z = Descending (TUX) - 1 Bit 14
117125 x = Range Scan (TUX) - 1 Bit 15
@@ -347,7 +355,16 @@ class ScanTabConf {
347355
348356 struct OpData {
349357 Uint32 apiPtrI;
358+ /*
359+ tcPtrI is the scan fragment record pointer, used in SCAN_NEXTREQ to
360+ acknowledge the reception of the batch of rows from a fragment scan.
361+ If RNIL, this means that this particular fragment is done scanning.
362+ */
350363 Uint32 tcPtrI;
364+ /*
365+ info encodes the number of rows and the length of the data sent in
366+ TRANSID_AI signals.
367+ */
351368 Uint32 info;
352369 };
353370
@@ -415,10 +432,25 @@ class ScanTabRef {
415432
416433};
417434
418- /* *
419- *
420- * SENDER: API
421- * RECIVER: Dbtc
435+ /*
436+ SENDER: API
437+ RECIVER: Dbtc
438+
439+ This signal is sent by API to acknowledge the reception of batches of rows
440+ from one or more fragment scans, and to request the fetching of the next
441+ batches of rows.
442+
443+ Any locks held by the transaction on rows in the previously fetched batches
444+ are released (unless explicitly transfered to this or another transaction in
445+ a TCKEYREQ signal with TakeOverScanFlag set).
446+
447+ The fragment scan batches to acknowledge are identified by the tcPtrI words
448+ in the list of struct OpData received in ScanTabConf (scan fragment record
449+ pointer).
450+
451+ The list of scan fragment record pointers is sent as an array of words,
452+ inline in the signal if <= 21 words, else as the first section in a long
453+ signal.
422454 */
423455class ScanNextReq {
424456 /* *
@@ -455,7 +487,12 @@ class ScanNextReq {
455487 UintR transId2; // DATA 3
456488
457489 // stopScan = 1, stop this scan
458-
490+
491+ /*
492+ After this data comes the list of scan fragment record pointers for the
493+ fragment scans to acknowledge, if they fit within the 25 words available
494+ in the signal (else they are sent in the first long signal section).
495+ */
459496};
460497
461498#endif
0 commit comments