Re: Introducing myself to Squid Devs

Shailesh Vashishth <[email protected]> Fri, 27 Dec 2024 11:37:03 +0530
Newsgroups gmane.comp.web.squid.devel
Message-ID <CABHxcGkq87FoxEAWVBViy1j-mmBG_rHqC8CjqfkLJT3o5antdA@mail.gmail.com>
--===============7517116641656593603==
Content-Type: multipart/alternative; boundary="0000000000003cc54f062a3a46b1"

--0000000000003cc54f062a3a46b1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi
I am trying to do the following ToDo in store_client.cc.
// TODO: Convert store_client into AsyncJob; make this call asynchronous
CodeContext::Reset(sc->_callback.codeContext);
debugs(90, 3, "checking client #" << i);
storeClientCopy2(this, sc);

Please help me understand why we need to make this call asynchronous?

Regards
Shailesh


On Sun, Oct 27, 2024 at 7:45=E2=80=AFPM Shailesh Vashishth <shavashishth@gm=
ail.com>
wrote:

> Hi
> There is another very small ToDo that I would like take up --
>
> This is also a very simple and small change -- replacing *Io with
> Store::IoStatus *and removing the *using *statement
>
> Address the following TODO:
> /* TODO: Remove this change-minimizing hack */
> using Io =3D Store::IoStatus;
> static constexpr Io ioUndecided =3D Store::ioUndecided;
> static constexpr Io ioReading =3D Store::ioReading;
> static constexpr Io ioWriting =3D Store::ioWriting;
> static constexpr Io ioDone =3D Store::ioDone;
>
>
> Regards
> Shailesh
>
> On Sat, Oct 26, 2024 at 12:54=E2=80=AFAM Shailesh Vashishth <
> [email protected]> wrote:
>
>> Hi
>> I would like to take up another Todo item that is listed here --
>> https://github.com/measurement-factory/squid-notes/blob/start/todos.md
>>
>> I would like to pick this item : I think this requires very small change=
,
>> where we just print *name_len *on the *stdout *using the custom function
>> for printing debug logs.
>>
>>
>>    - Address the following TODO by adding any using Raw::upto(n) which
>>    will limit the size value of passed to PrintHex() and write() inside
>>    Raw::print(). That value is currently size_.
>>
>> if (name_len > 65534) {
>>> /* String must be LESS THAN 64K and it adds a terminating NULL */
>>> // TODO: update this to show proper name_len in Raw markup, but not
>>> print all that
>>> debugs(55, 2, "ignoring huge header field (" << Raw("field_start",
>>> field_start, 100) << "...)");
>>>
>>
>>
>> My current PR (*https://github.com/squid-cache/squid/pull/1921
>> <https://github.com/squid-cache/squid/pull/1921>*) has succeeded all
>> Pipeline stages, only your approval is remaining.
>>
>> Regards
>> Shailesh
>>
>> On Wed, Oct 23, 2024 at 12:30=E2=80=AFAM Shailesh Vashishth <
>> [email protected]> wrote:
>>
>>> Hi
>>> I have made a change to a math expression in store_client.cc and raised
>>> the following pull request.
>>>
>>> if (curlen > expectlen*(Config.quickAbort.pct/100.0)) {
>>> debugs(90, 3, "quick-abort? NO past point of no return");
>>> return false;
>>> }
>>>
>>> I have also ran the test-build.sh (suggested in Submissions Checklist)
>>> and it passed all test cases.
>>>
>>> Please review the following pull request -
>>> https://github.com/squid-cache/squid/pull/1921
>>>
>>> Regards
>>> Shailesh
>>>
>>> On Sat, Oct 5, 2024 at 1:27=E2=80=AFPM Shailesh Vashishth <
>>> [email protected]> wrote:
>>>
>>>> Hi Alex,
>>>> I read your hint and made changes accordingly, it didn't go to spam
>>>> this time. I was going through the Squid Docs, on how to submit PR and=
 do
>>>> those pre-merge self tests (Submission Checklist).
>>>>
>>>> I will do the steps given in the Submission Checklist and submit a PR
>>>> in a day or two.
>>>>
>>>> Thank you for helping me with getting started and joining the project.
>>>>
>>>> Regards
>>>> Shailesh
>>>>
>>>>
>>>> On Fri, Oct 4, 2024 at 6:53=E2=80=AFPM Alex Rousskov <
>>>> [email protected]> wrote:
>>>>
>>>>> On 2024-10-03 15:49, Shailesh Vashishth wrote:
>>>>>
>>>>> > I would like to contribute to the Squid Project and I have picked
>>>>> one
>>>>> > small task out of the ToDos  for myself.
>>>>>
>>>>>
>>>>> Hello Shailesh,
>>>>>
>>>>>      Welcome to the Project and good luck with your first task! If yo=
u
>>>>> need any help, please do not hesitate to ask on this mailing list or
>>>>> to
>>>>> post a draft pull request for discussion on GitHub:
>>>>> https://wiki.squid-cache.org/MergeProcedure
>>>>>
>>>>> BTW, I have also emailed you a few hints regarding the code below whe=
n
>>>>> you asked about it privately -- check your spam folder if you have no=
t
>>>>> seen my response dated September 30, 2024...
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Alex.
>>>>>
>>>>>
>>>>> >     *// XXX: This is absurd! TODO: For positives, "a/(b/c) > d" is
>>>>> "a*c
>>>>> >      > b*d".
>>>>> >     **if (expectlen < 100) {
>>>>> >     **   debugs(90, 3, "quick-abort? NO avoid FPE");
>>>>> >     **   return false;
>>>>> >     **}*
>>>>> >
>>>>> >     */_if ((curlen / (expectlen / 100)) > (Config.quickAbort.pct)) =
{
>>>>> >     _/**   debugs(90, 3, "quick-abort? NO past point of no return")=
;
>>>>> >     **   return false;
>>>>> >     **}*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>

--0000000000003cc54f062a3a46b1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi<br>I am trying to do the following ToDo in store_client=
.cc.=C2=A0<br><div style=3D"color:rgb(101,123,131);background-color:rgb(253=
,246,227);font-family:Menlo,Monaco,&quot;Courier New&quot;,monospace;font-s=
ize:12px;line-height:18px;white-space:pre"><div style=3D"line-height:18px">=
<div><span style=3D"color:rgb(147,161,161);font-style:italic">// TODO: Conv=
ert store_client into AsyncJob; make this call asynchronous</span></div><di=
v>        <span style=3D"color:rgb(203,75,22)">CodeContext</span>::<span st=
yle=3D"color:rgb(38,139,210)">Reset</span>(<span style=3D"color:rgb(38,139,=
210)">sc</span>-&gt;<span style=3D"color:rgb(38,139,210)">_callback</span>.=
<span style=3D"color:rgb(38,139,210)">codeContext</span>);</div><div>      =
  <span style=3D"color:rgb(38,139,210)">debugs</span>(<span style=3D"color:=
rgb(211,54,130)">90</span>, <span style=3D"color:rgb(211,54,130)">3</span>,=
 <span style=3D"color:rgb(42,161,152)">&quot;checking client #&quot;</span>=
 <span style=3D"color:rgb(133,153,0)">&lt;&lt;</span> <span style=3D"color:=
rgb(38,139,210)">i</span>);</div><div>        <span style=3D"color:rgb(38,1=
39,210)">storeClientCopy2</span>(<span style=3D"color:rgb(38,139,210)">this=
</span>, <span style=3D"color:rgb(38,139,210)">sc</span>);</div></div></div=
><br>Please help me understand why we need to make this call asynchronous?<=
br><br>Regards<br>Shailesh<br><br></div><br><div class=3D"gmail_quote gmail=
_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Oct 27, 202=
4 at 7:45=E2=80=AFPM Shailesh Vashishth &lt;<a href=3D"mailto:shavashishth@=
gmail.com">[email protected]</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi=C2=A0<br>There is anot=
her very small ToDo that I would like take up --=C2=A0<br><br>This is also =
a very simple and small change -- replacing <b><span style=3D"background-co=
lor:rgb(255,255,0)">Io with Store::IoStatus</span> </b>and removing the <b>=
<span style=3D"background-color:rgb(255,255,0)">using</span> </b>statement<=
br><div><br></div><div><div style=3D"color:rgb(204,204,204);background-colo=
r:rgb(31,31,31);font-family:Menlo,Monaco,&quot;Courier New&quot;,monospace;=
font-size:12px;line-height:18px;white-space:pre-wrap"><div>Address the foll=
owing TODO:</div><div><span style=3D"color:rgb(106,153,85)">/* TODO: Remove=
 this change-minimizing hack */</span></div><div><span style=3D"color:rgb(1=
97,134,192)">using</span> <span style=3D"color:rgb(78,201,176)">Io</span> <=
span style=3D"color:rgb(212,212,212)">=3D</span> <span style=3D"color:rgb(7=
8,201,176)">Store</span>::<span style=3D"color:rgb(78,201,176)">IoStatus</s=
pan>;</div><div><span style=3D"color:rgb(86,156,214)">static</span> <span s=
tyle=3D"color:rgb(86,156,214)">constexpr</span> Io ioUndecided <span style=
=3D"color:rgb(212,212,212)">=3D</span> <span style=3D"color:rgb(78,201,176)=
">Store</span>::ioUndecided;</div><div><span style=3D"color:rgb(86,156,214)=
">static</span> <span style=3D"color:rgb(86,156,214)">constexpr</span> Io i=
oReading <span style=3D"color:rgb(212,212,212)">=3D</span> <span style=3D"c=
olor:rgb(78,201,176)">Store</span>::ioReading;</div><div><span style=3D"col=
or:rgb(86,156,214)">static</span> <span style=3D"color:rgb(86,156,214)">con=
stexpr</span> Io ioWriting <span style=3D"color:rgb(212,212,212)">=3D</span=
> <span style=3D"color:rgb(78,201,176)">Store</span>::ioWriting;</div><div>=
<span style=3D"color:rgb(86,156,214)">static</span> <span style=3D"color:rg=
b(86,156,214)">constexpr</span> Io ioDone <span style=3D"color:rgb(212,212,=
212)">=3D</span> <span style=3D"color:rgb(78,201,176)">Store</span>::ioDone=
;</div></div></div><div><br></div><div><br></div><div>Regards<br>Shailesh</=
div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_at=
tr">On Sat, Oct 26, 2024 at 12:54=E2=80=AFAM Shailesh Vashishth &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr">Hi<br>I would like to take up another Todo item that is li=
sted here --=C2=A0<a href=3D"https://github.com/measurement-factory/squid-n=
otes/blob/start/todos.md" target=3D"_blank">https://github.com/measurement-=
factory/squid-notes/blob/start/todos.md</a><div><br></div><div>I would like=
 to pick this item : I think this requires very small change, where we just=
 print <b>name_len </b>on the <b>stdout </b>using the custom function for p=
rinting debug logs.<br><br><ul dir=3D"auto" style=3D"box-sizing:border-box;=
padding-left:2em;margin-top:0px;color:rgb(240,246,252);font-family:-apple-s=
ystem,&quot;system-ui&quot;,&quot;Segoe UI&quot;,&quot;Noto Sans&quot;,Helv=
etica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&q=
uot;;background-color:rgb(13,17,23)"><li style=3D"box-sizing:border-box">Ad=
dress the following TODO by adding any using Raw::upto(n) which will limit =
the size value of passed to PrintHex() and write() inside Raw::print(). Tha=
t value is currently size_.</li></ul><div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex"><div style=3D"color:rgb(204,204,204);background-color:rgb(=
31,31,31);font-family:Menlo,Monaco,&quot;Courier New&quot;,monospace;font-s=
ize:12px;line-height:18px;white-space:pre-wrap"><div><span style=3D"color:r=
gb(197,134,192)">if</span> (name_len <span style=3D"color:rgb(212,212,212)"=
>&gt;</span> <span style=3D"color:rgb(181,206,168)">65534</span>) {</div><d=
iv><span style=3D"color:rgb(106,153,85)">    /* String must be LESS THAN 64=
K and it adds a terminating NULL */</span></div><div><span style=3D"color:r=
gb(106,153,85)">    // TODO: update this to show proper name_len in Raw mar=
kup, but not print all that</span></div><div>    <span style=3D"color:rgb(2=
20,220,170)">debugs</span>(<span style=3D"color:rgb(181,206,168)">55</span>=
, <span style=3D"color:rgb(181,206,168)">2</span>, <span style=3D"color:rgb=
(206,145,120)">&quot;ignoring huge header field (&quot;</span> <span style=
=3D"color:rgb(212,212,212)">&lt;&lt;</span> <span style=3D"color:rgb(220,22=
0,170)">Raw</span>(<span style=3D"color:rgb(206,145,120)">&quot;field_start=
&quot;</span>, field_start, <span style=3D"color:rgb(181,206,168)">100</spa=
n>) <span style=3D"color:rgb(212,212,212)">&lt;&lt;</span> <span style=3D"c=
olor:rgb(206,145,120)">&quot;...)&quot;</span>);</div></div></blockquote><b=
r><br>My current PR (<u><a href=3D"https://github.com/squid-cache/squid/pul=
l/1921" target=3D"_blank">https://github.com/squid-cache/squid/pull/1921</a=
></u>) has succeeded all Pipeline stages, only your approval is remaining.<=
br><br>Regards<br>Shailesh<br></div></div></div><br><div class=3D"gmail_quo=
te"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Oct 23, 2024 at 12:30=E2=
=80=AFAM Shailesh Vashishth &lt;<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr">Hi=
<br>I have made a change to a math expression in store_client.cc and raised=
 the following pull request.<br><br><div style=3D"color:rgb(204,204,204);ba=
ckground-color:rgb(31,31,31);font-family:Menlo,Monaco,&quot;Courier New&quo=
t;,monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><div><sp=
an style=3D"color:rgb(197,134,192)">if</span> (<span style=3D"color:rgb(156=
,220,254)">curlen</span> <span style=3D"color:rgb(212,212,212)">&gt;</span>=
 <span style=3D"color:rgb(156,220,254)">expectlen</span><span style=3D"colo=
r:rgb(212,212,212)">*</span>(<span style=3D"color:rgb(156,220,254)">Config<=
/span>.<span style=3D"color:rgb(156,220,254)">quickAbort</span>.<span style=
=3D"color:rgb(156,220,254)">pct</span><span style=3D"color:rgb(212,212,212)=
">/</span><span style=3D"color:rgb(181,206,168)">100.0</span>)) {</div><div=
>        <span style=3D"color:rgb(86,156,214)">debugs</span>(<span style=3D=
"color:rgb(181,206,168)">90</span>, <span style=3D"color:rgb(181,206,168)">=
3</span>, <span style=3D"color:rgb(206,145,120)">&quot;quick-abort? NO past=
 point of no return&quot;</span>);</div><div>        <span style=3D"color:r=
gb(197,134,192)">return</span> <span style=3D"color:rgb(86,156,214)">false<=
/span>;</div><div>    }</div></div><br>I have also ran the test-build.sh (s=
uggested in Submissions Checklist) and it passed all test cases.=C2=A0<br><=
br>Please review the following pull request -=C2=A0<a href=3D"https://githu=
b.com/squid-cache/squid/pull/1921" target=3D"_blank">https://github.com/squ=
id-cache/squid/pull/1921</a><br><br>Regards<br>Shailesh<br></div><br><div c=
lass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Oct 5, 2=
024 at 1:27=E2=80=AFPM Shailesh Vashishth &lt;<a href=3D"mailto:shavashisht=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi Al=
ex,<br>I read your hint and made=C2=A0changes=C2=A0accordingly, it didn&#39=
;t go to spam this time. I was going through the Squid Docs, on how to subm=
it PR and do those pre-merge self tests (Submission Checklist).<br><br>I wi=
ll do the steps given in the Submission Checklist and submit a PR in a day =
or two.<br><br>Thank you for helping me with=C2=A0getting=C2=A0started and =
joining=C2=A0the project.<br><br>Regards<br>Shailesh<br><br></div><br><div =
class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Oct 4, =
2024 at 6:53=E2=80=AFPM Alex Rousskov &lt;<a href=3D"mailto:rousskov@measur=
ement-factory.com" target=3D"_blank">[email protected]</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 202=
4-10-03 15:49, Shailesh Vashishth wrote:<br>
<br>
&gt; I would like to contribute to the Squid Project and I have picked one =
<br>
&gt; small task out of the=C2=A0ToDos=C2=A0 for myself.<br>
<br>
<br>
Hello Shailesh,<br>
<br>
=C2=A0 =C2=A0 =C2=A0Welcome to the Project and good luck with your first ta=
sk! If you <br>
need any help, please do not hesitate to ask on this mailing list or to <br=
>
post a draft pull request for discussion on GitHub:<br>
<a href=3D"https://wiki.squid-cache.org/MergeProcedure" rel=3D"noreferrer" =
target=3D"_blank">https://wiki.squid-cache.org/MergeProcedure</a><br>
<br>
BTW, I have also emailed you a few hints regarding the code below when <br>
you asked about it privately -- check your spam folder if you have not <br>
seen my response dated September 30, 2024...<br>
<br>
<br>
Cheers,<br>
<br>
Alex.<br>
<br>
<br>
&gt;=C2=A0 =C2=A0 =C2=A0*// XXX: This is absurd! TODO: For positives, &quot=
;a/(b/c) &gt; d&quot; is &quot;a*c<br>
&gt;=C2=A0 =C2=A0 =C2=A0 &gt; b*d&quot;.<br>
&gt;=C2=A0 =C2=A0 =C2=A0**if (expectlen &lt; 100) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0**=C2=A0 =C2=A0debugs(90, 3, &quot;quick-abort? NO =
avoid FPE&quot;);<br>
&gt;=C2=A0 =C2=A0 =C2=A0**=C2=A0 =C2=A0return false;<br>
&gt;=C2=A0 =C2=A0 =C2=A0**}* <br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0*/_if ((curlen / (expectlen / 100)) &gt; (Config.qu=
ickAbort.pct)) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0_/**=C2=A0 =C2=A0debugs(90, 3, &quot;quick-abort? N=
O past point of no return&quot;);<br>
&gt;=C2=A0 =C2=A0 =C2=A0**=C2=A0 =C2=A0return false;<br>
&gt;=C2=A0 =C2=A0 =C2=A0**}*<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>

--0000000000003cc54f062a3a46b1--

--===============7517116641656593603==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
squid-dev mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-dev

--===============7517116641656593603==--