bakaid commented on a change in pull request #740: MINIFICPP-1144 - Fix
HTTPCallback freeze and refactor class
URL: https://github.com/apache/nifi-minifi-cpp/pull/740#discussion_r380881814
##########
File path: extensions/http-curl/client/HTTPCallback.h
##########
@@ -33,148 +34,195 @@ namespace minifi {
namespace utils {
/**
- * will stream as items are processed.
+ * The original class here was deadlock-prone, undocumented and was a
smorgasbord of multithreading primitives used inconsistently.
+ * This is a rewrite based on the contract inferred from this class's usage in
utils::HTTPClient
+ * through HTTPStream and the non-buggy part of the behaviour of the original
class.
+ * Based on these:
Review comment:
Normally I agree, but this class is pretty poorly designed even in this
refactored state, because it had to conform to the existing interface and its
current usage by HTTPStream.
Understanding these original limitations is a vital part of understanding
why this class is the way it is.
This whole flow should be rethought and rewritten entirely - I planned to
create a follow-up issue for it, and I will soon - in the interim, this spares
the next people coming along from having to trace back why things are designed
this way.
----------------------------------------------------------------
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]
With regards,
Apache Git Services