gjacoby126 commented on pull request #860: URL: https://github.com/apache/phoenix/pull/860#issuecomment-677889679
@kadirozde - Single Responsibility Principle. With this PR, the responsibility for handling closes and splits is spread between both UARO and the rebuild scanner. If someday we refactor UARO so that upsert selects and batch deletes have their own classes (which we really ought to do eventually), then we'd have to have special logic for splits / closes in 4 places. In general, this class design of having both UARO having a pointer to the scanner and the scanner having a pointer to UARO is a code smell; it indicates the classes are too tightly coupled. It's better if the scanner doesn't know about UARO, or splits or other region operations, but just has a notion that it might be canceled by an external process. This puts the UARO in the position of a task manager, and the scanner as a task worker, with a clean separation between them. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
