Date | Commit message (Collapse) |
|
This allows us to wait on "git log" output in a non-blocking manner
while being able to throttle on backpressure from slow clients
when used with pi-httpd.
|
|
This allows pi-httpd to service other I/O while we wait on "git
symbolic-ref" to run. And psgi_return will be used in the next
commit...
|
|
Hopefully this makes the code easier-to-follow for random
readers. This requires a small amount of modification to
our one caller, but this is a new, unstable API (as is
nearly all of our code).
|
|
We don't want to be triggering OOM or swapping on weaker
systems when we have dozens of inboxes as potential targets.
|
|
We must call Email::Simple methods directly in our monkey patch
for Email::MIME to call the intended method. Using SUPER in our
subclass would instead hit a different, unintended method in
Email::MIME.
Reported-by: Junio C Hamano <gitster@pobox.com>
<xmqq4m0wb43w.fsf@gitster.mtv.corp.google.com>
|
|
Remove an outdated comment while we're at it, too.
|
|
We can more effectly nuke circular references by clearing
the entire PSGI $env, not just particular keys, when
there are self-referential fields such as "qspawn.response"
in our environment.
|
|
This new asynchronous API, psgi_qx, will allow us to take
advantage of non-blocking I/O from even small commands;
as those may still need to wait for slow operations.
|
|
We'll probably use this in a lot of places...
|
|
For now, qspawn provides resource management for dealing with
expensive "git ls-tree" processes.
|
|
We may eventually handle tree parsing ourselves (since we
already git cat-file), but for now we can rely on ls-tree
to give good output and qspawn to manage resource allocation.
|
|
We don't need these legacy routines anymore and use the
newer stream-friendly _sed interface.
|
|
If an HTTP client disconnects while we're piping the output of a
process to them, break the pipe of the process to reclaim
resources as soon as possible.
|
|
expath is always defined, even to an empty string,
so simplify the conditional for checking it.
|
|
This wrapper class actually does both reading and
writing, and a shorter name is nicer.
|
|
D::S creates a reference for this, anyways, so avoid
the extra work by doing it ourselves.
|
|
Metaprogramming can be difficult-to-read after several
months, so leave comments in place to describe common
usage results of.
|
|
This will prevent too many processes from being spawned at once
while also allowing us to respond to backpressure from slow
clients.
|
|
We may need to do this even more aggressively, since the
Xapian database does not always give the latest results.
This time, we'll do it without relying on weak references,
and instead check refcounts.
|
|
This is a potentially expensive operation, so we may want to
give it it's own limiter channel.
|
|
|
|
|
|
This prevents "git show" processes from monopolizing
the system and allows us to better handle backpressure
from gigantic commits.
|
|
Oops :x
|
|
This should fix problems with multipart messages where
text/plain parts lack a header.
cf. git clone --mirror https://github.com/rjbs/Email-MIME.git
refs/pull/28/head
In the future, we may still introduce as streaming
interface to reduce memory usage on large emails.
|
|
This drastically cuts down the amount of duplicate code
we have in this branch.
|
|
We don't appear to be using it anywhere
|
|
* origin/master:
inbox: properly register cleanup timer for git processes
search: remove subject_summary
searchmsg: favor direct hash access over accessor methods
remove incorrect comment about strftime + locales
config: allow per-inbox nntpserver
inbox: eliminate weaken usage entirely
inbox: describe the full key name
config: remove unused get() method
config: always use namespaced "publicinboxlimiter"
qspawn: prepare to support runtime reloading of Limiter
http: remove weaken usage, reduce anonsub capture scope
httpd/async: remove weaken usage
http: fix spelling error
watch: watchspam affects all configured inboxes
doc: minor updates to design notes
|
|
This will allow us to handle network operations while waiting
on "git cat-file" to seek and unpack things.
|
|
We never used this feature, so lets drop it for now
since we can have fine-grained memory release with
reference counting, anyways.
|
|
We still need to cleanup git processes occasionally, since
"git cat-file --batch" does not release old packs (and
git processes are fairly expensive).
For SQLite and Xapian file handles, they should be capable
of managing themselves without too much trouble, so lets
try keeping them for the lifetime of a process.
|
|
Apparently it never actually got used, and the world seems
fine without it, so we can drop it.
While we're at it, consider removing our subject_path
usage from existence, too. We are not using fancy subject-line
based URLs, here.
|
|
This is faster, smaller, and more straighforward to me with
fewer layers of indirection.
|
|
We only need strftime to be locale-independent when generating
dates for email and HTTP headers. Purely numeric dates can
use strftime for ease-of-readability.
|
|
This allows certain inboxes to override the global nntpserver
(perhaps under a different domain).
|
|
We can do a better job initializing the data structure
so we no longer need to rely on weak references to cleanup
when we ditch the config on reload.
|
|
Hopefully make this easier for future generations to understand.
|
|
This seems like an unnecessary abstraction, or an abstraction
on the wrong level.
|
|
I'm not sure if we'll ever support sharing a config file
with other tools, but maybe we will, and "limiter" is
too generic.
|
|
We may allow the {max} value of a limiter to be changed
in the future, so lets start accounting for it before we
spawn followup processes.
|
|
Avoiding weaken here is no more dangerous than the existing
circular refs (e.g. psgix.io) we create and manage throughout
the lifetime of the connection. So, trust ourselves to maintain
the data structure properly and avoid triggering extra memory
usage.
While we're at it, avoid having anonymous subroutines capture
more variables than necessary to simplify reference auditing.
|
|
We do not need to use weaken() here, so avoid it to simplify our
interactions with Perl; as weaken requires additional storage
and (it seems) time complexity.
|
|
Oops. And we'll be fixing circular references from now...
|
|
If a message is spam in one mailbox, it is spam in all others a
particular user/group will care about.
|
|
At the moment, we always set expath, so it will always be
defined.
|
|
It is never used, and inappropriate to support in generic code.
HTTPD::Async already sets non-blocking, and it's better to do it
in -httpd-specific code since we know our -httpd can handle it.
|
|
This is expensive, so we will utilize the qspawn system
to prevent excessive overhead.
|
|
And start generalizing the qspawn usage code for PSGI
with psgi_return.
|
|
We may not keep this feature after all, but for now we'll hold
off on creating it to cheapen instantiation.
|
|
* origin/master: (25 commits)
evcleanup: ensure deferred close from timers are handled ASAP
httpd/async: improve variable naming
githttpbackend: minor cleanups to improve readability
githttpbackend: simplify compatibility code
githttpbackend: minor readability improvement
http: fix clobbering of $null_io
linkify: modify argument in place
view: do not modify array during iteration
view: stop chomping off whitespace at ends of messages
view: remove unused parameter
search: lookup_mail handles modified DBs
doc: various comments on async handling
searchthread: simplify API and remove needless OO
searchthread: update comment about loop prevention
searchmsg: remove ensure_metadata
tests: add thread-all testing for benchmarking
searchmsg: do not memoize {date} field
searchmsg: remove locale-dependency for ->date
t/config.t: fix feedmax default
wwwtext: link to RFC4685 (Atom Threading)
...
|