Skip to content

Conversation

@oschaaf
Copy link
Member

@oschaaf oschaaf commented May 30, 2018

As presented at the summit in Cork.
See README.md for more information.

@oschaaf
Copy link
Member Author

oschaaf commented May 30, 2018

The RAT complaints are on trivial files in examples/, do we need to add the asf license to them regardless, or can we ignore those?

There's one complaint that needs a closer look, by someone more knowledgeable then me: src/configuru.hpp

@zwoop
Copy link
Contributor

zwoop commented May 30, 2018

My preference would be that you add the license blurb where possible. I.e. if a config file can not handle comments, then you can add that particular file to the RAT exclusion, but in general, it's just a lot better to minimize the exclusions when at all possible.

@oschaaf
Copy link
Member Author

oschaaf commented May 30, 2018

RAT & clang passing, but now autest complains, at a glance on seemingly unrelated stuff

@oschaaf
Copy link
Member Author

oschaaf commented May 31, 2018

Some more notes:

  • I tested this with ATS 7.1.3
  • Running ASP.net via mono fastcgi [1], it seems something is not right when the connection pooling feature is enabled, because after a couple of requests things the browser will hang. This is probably because of some internal state getting messed up due to a missed edge case. Disabling connection pooling by setting proxy.config.http.fcgi.host.max_requests to 0 resolves it for me.

Samples of .NET handling requests:
http://104.199.7.245/test.aspx
http://104.199.7.245/test.css

@bryancall bryancall added this to the 8.0.0 milestone Jun 4, 2018
@zwoop zwoop modified the milestones: 8.0.0, 9.0.0 Jun 6, 2018
@oschaaf
Copy link
Member Author

oschaaf commented Jun 20, 2018

(resolved small conflict in rat excludes that arose by a commit on master)


namespace ats_plugin
{
// A macro to disallow the copy constructor and operator= functions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this better as either an inherited class or using something like

TypeName(const TypeName&) = delete;

void
ComputeStartTime()
{
this->start_time_ = static_cast<std::size_t>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could declare that as std::chrono::high_resolution_clock::rep to avoid the cast and make other operations easier later. Also I have had some problems with time_since_epoch for std::chrono::high_resolution_clock on some compilers. I ended up using std::chrono::system_clock and static_assert to verify the resolution was sufficiently fine.

}

void
profileLength()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps better as printProfileLength() since it does the printing?

Headers &h = transaction.getClientRequest().getHeaders();
if (h.isInitialized()) {
atscppapi::header_field_iterator it = h.begin();
for (it = h.begin(); it != h.end(); ++it) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to do a range-based for loops, or clang-tidy will change it

* limitations under the License.
*/

#ifndef REQUEST_QUEUE_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We switch to use pragma once

@oschaaf
Copy link
Member Author

oschaaf commented Jun 26, 2018

@bryancall @SolidWallOfCode thanks for the feedback.
(Sorry for the late reply, I was OOO. I will address the review comments soon)

@oschaaf
Copy link
Member Author

oschaaf commented Jun 27, 2018

So, I set up this plugin on a development machine based on the master branch, for addressing the comments in here. Previously, on 7.x it worked, but on master the plugin hangs after the intercept is hooked.

[Jun 27 15:16:00.557] {0x7f63d5b90700} DEBUG: <HttpSM.cc:1957 (state_send_server_request_header)> (http) [0] [&HttpSM::state_send_server_request_header, VC_EVENT_WRITE_COMPLETE]
[Jun 27 15:16:30.590] {0x7f63d5b90700} DEBUG: <HttpSM.cc:2529 (main_handler)> (http) [0] [HttpSM::main_handler, VC_EVENT_INACTIVITY_TIMEOUT]

This requires some digging into first, before I can go on and address comments.

@oschaaf oschaaf force-pushed the oschaaf-ats-fastcgi branch from c2b99df to bae6692 Compare July 4, 2018 06:24
oschaaf added a commit that referenced this pull request Jul 4, 2018
This change unbreaks using cppapi ServerIntercepts

(Ran into a hanging FastCGI plugin while trying address comments in
#3749)
@oschaaf
Copy link
Member Author

oschaaf commented Jul 4, 2018

Once #3927 lands, I plan to rebase this and proceed to addressing comments

@oschaaf oschaaf force-pushed the oschaaf-ats-fastcgi branch from bae6692 to 129dcb5 Compare July 5, 2018 19:34
@oschaaf
Copy link
Member Author

oschaaf commented Jul 5, 2018

I think I addressed the comments in here, PTAL?

@oschaaf
Copy link
Member Author

oschaaf commented Aug 10, 2018

@bryancall I addressed your comment, I think, WDYT?

@oschaaf
Copy link
Member Author

oschaaf commented Oct 8, 2018

@bryancall ping :-)

@bryancall
Copy link
Contributor

bryancall commented Oct 24, 2018

@oschaaf looks good, can you please squash the commits

@oschaaf
Copy link
Member Author

oschaaf commented Oct 24, 2018

@bryancall Sure, I will squash them

@oschaaf oschaaf force-pushed the oschaaf-ats-fastcgi branch from c1030af to bf676fd Compare October 24, 2018 21:07
As presented at the summit in Cork.
See README.md for more information.
@oschaaf oschaaf force-pushed the oschaaf-ats-fastcgi branch from bf676fd to 51c40a2 Compare October 24, 2018 21:12
@oschaaf
Copy link
Member Author

oschaaf commented Oct 24, 2018

@bryancall Rebased onto the head of master, squashed & force pushed.

@oschaaf oschaaf merged commit 08df216 into apache:master Oct 24, 2018
@oschaaf oschaaf deleted the oschaaf-ats-fastcgi branch October 24, 2018 22:11
@bryancall bryancall modified the milestones: 9.0.0, 8.1.0 Mar 27, 2019
@bryancall
Copy link
Contributor

Cherry picked to 8.1.0

@zwoop zwoop modified the milestones: 8.1.0, 8.1.0-nogo Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants