Bugzilla – Attachment 127157 Details for
Bug 26871
L1 cache still too long in SIP Server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26871: Flush SIP2 cache on every SIP request
Bug-26871-Flush-SIP2-cache-on-every-SIP-request.patch (text/plain), 2.44 KB, created by
Martin Renvoize (ashimema)
on 2021-11-01 11:12:36 UTC
(
hide
)
Description:
Bug 26871: Flush SIP2 cache on every SIP request
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-01 11:12:36 UTC
Size:
2.44 KB
patch
obsolete
>From 94453580d66d3d8a98f3a24927592ec708eb8591 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Sun, 10 Oct 2021 11:01:29 +0000 >Subject: [PATCH] Bug 26871: Flush SIP2 cache on every SIP request > >SIP connections tend to be long lived, weeks if not months, in the >libraries I see. Basically the connection per SIP machine is initiated >once when the SIP machine boots and then never closed until >maintanance needs to be done. Therefore we need to reset the Koha's L1 >caches on every SIP request to get the latest sysprefs and configs >from the memcached cache that is shared between all the Koha >programs (intranet, opac, sip, cronjobs) and is guaranteed to be up to >date. > >To test: > 0. Have kohadevbox > 1. Enable IssueLog > 2. In one terminal run the command "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml" > 3. Checkin and return a book using telnet: > > $ telnet localhost 6001 > 9300CNterm1|COterm1|CPCPL| > 11YN20211010 10565320211010 105653AOCPL|AA1|AB3999900000001|ACterm1|BON|BIN| > 09N20211010 10564420211010 105644APCPL|AOCPL|AB3999900000001|ACterm1|BIN| > > 4. Keep the telnet connection open and go to > http://localhost:8081/cgi-bin/koha/tools/viewlog.pl and check that > the *checkout* entry is in the circulation rules 5. > 6. Disable IssueLog > 7. Move back to the telnet prompt and check out and return a book again > > 11YN20211010 10565320211010 105653AOCPL|AA1|AB3999900000001|ACterm1|BON|BIN| > 09N20211010 10564420211010 105644APCPL|AOCPL|AB3999900000001|ACterm1|BIN| > > 8. Go check out the circulation logs and notice a new entry was added > when it shouldn't have according to the IssueLog syspref! > 9. Apply patch and repeat steps to notice that the syspref is now > followed correctly. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/SIPServer.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm >index df52d5c9af..b4cf77f539 100644 >--- a/C4/SIP/SIPServer.pm >+++ b/C4/SIP/SIPServer.pm >@@ -351,6 +351,9 @@ sub read_request { > my $raw_length; > local $/ = "\015"; > >+ # SIP connections might be active for weeks, clear L1 cache on every request >+ Koha::Caches->flush_L1_caches(); >+ > # proper SPEC: (octal) \015 = (hex) x0D = (dec) 13 = (ascii) carriage return > my $buffer = <STDIN>; > if ( defined $buffer ) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26871
:
126016
|
127111
| 127157