TDQ-8789 sort the GID and master in data section for t-swoosh algorithm