]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cidx_xap_helper_aux: complain about truncated inputs
authorEric Wong <e@80x24.org>
Mon, 13 Nov 2023 13:15:46 +0000 (13:15 +0000)
committerEric Wong <e@80x24.org>
Mon, 13 Nov 2023 21:55:05 +0000 (21:55 +0000)
This will help us notice bugs and system resource limitations
sooner rather than later.

lib/PublicInbox/CidxXapHelperAux.pm

index f402bde0bfb1795bad3bc5d2d3312de63d9d27c2..91c9b0211c79ba00206ca0614b3b7990e040a8a2 100644 (file)
@@ -26,7 +26,11 @@ sub event_step {
        }
        my $pfx = $self->{pfx};
        if ($n == 0) {
-               $self->{cidx}->progress("$pfx $buf") if $buf ne '';
+               warn "BUG? $pfx buf=$buf" if $buf ne '';
+               if (delete $self->{cidx}->{PENDING}->{$pfx}) {
+                       warn "BUG? $pfx did not get mset.size";
+                       $self->{cidx}->index_next;
+               }
                return $self->close;
        }
        my @lines = split(/^/m, $buf);