Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1650

Sorting a HashSet only to put it back into a HashSet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 1.0.0.Final
    • None
    • core-library
    • None

      Right now in the method that sorts a Set of TableIds on line 236 in RelationalSnapshotchangeEventSource.java, if there is no whitelist supplied the method returns a set of sorted TableIds but in a HashSet Collection (line 247). When it gets added back to a HashSet, ordering is lost and the sort operation was essentially useless. Instead, changing it to a LinkedHashSet should preserve order (it is a LinkedHashSet for when whitelist is supplied).

              Unassigned Unassigned
              gnaazr95 G Singh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: