Motr  M0
m0_dix_next_sort_ctx Struct Reference

#include <req.h>

Collaboration diagram for m0_dix_next_sort_ctx:
Collaboration graph

Data Fields

struct m0_cas_reqsc_creq
 
struct m0_cas_next_replysc_reps
 
uint32_t sc_reps_nr
 
bool sc_stop
 
bool sc_done
 
uint32_t sc_pos
 

Detailed Description

Sorting context for merge sorting NEXT results.

There is exactly one sorting context per CAS reply carrying records from one component catalogue. All records from CAS reply are loaded to 'sc_reps' before sorting algorithm starts. Sorting context has current position that is advanced during sorting algorithm.

Sorting algorithm for every starting key requested in NEXT operation basically do the following:

  • In every sorting context find first record related to this starting key and sets current position to it.
  • Goes through all sorting contexts looking at records at current position and find the record with minimal key among them.
  • Add found record to a result set.
  • Advances current position in all sorting contexts, so it points to the first record with a key bigger than the found one.

Definition at line 133 of file req.h.

Field Documentation

◆ sc_creq

struct m0_cas_req* sc_creq

Definition at line 134 of file req.h.

◆ sc_done

bool sc_done

Definition at line 138 of file req.h.

◆ sc_pos

uint32_t sc_pos

Definition at line 139 of file req.h.

◆ sc_reps

struct m0_cas_next_reply* sc_reps

Definition at line 135 of file req.h.

◆ sc_reps_nr

uint32_t sc_reps_nr

Definition at line 136 of file req.h.

◆ sc_stop

bool sc_stop

Definition at line 137 of file req.h.


The documentation for this struct was generated from the following file: