vinyl: refactor vy_read_iterator_next
The function looks rather messy now. Let's rearrange its code to make it look better and facilitate further development: - Move the debug checks making sure that the next key meets search criteria and doesn't violate the iteration order to the place where we look up the next key, i.e. to vy_read_iterator_next_key. - Move result tracking in tx read set from vy_read_iterator_next_key to vy_read_iterator_next so that the former now just advances the iterator to the next key and does nothing else. - Remove vy_read_iterator::search_started. We don't really need it as we can use (vy_read_iterator::last_stmt == NULL) condition instead. - Rearrange the code of vy_read_iterator_next to reduce indentation level. - Remove/rename some variables and labels. Add some comments.
Loading
Please register or sign in to comment