user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/5] extsearchidx: remove needless SHA-1 check
  2020-12-07  7:40  5% [PATCH 0/5] extindex: random cleanups Eric Wong
@ 2020-12-07  7:40  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-12-07  7:40 UTC (permalink / raw)
  To: meta

There is no need to verify checksums of data already stored in
git.  Doing this ourselves also limits flexibility in moving to
other hashes.
---
 lib/PublicInbox/ExtSearchIdx.pm | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 4de47b58..819c7903 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -91,14 +91,6 @@ sub attach_config {
 	$cfg->each_inbox(\&_ibx_attach, $self);
 }
 
-sub git_blob_digest ($) {
-	my ($bref) = @_;
-	my $dig = Digest::SHA->new(1); # XXX SHA256 later
-	$dig->add('blob '.length($$bref)."\0");
-	$dig->add($$bref);
-	$dig;
-}
-
 sub is_bad_blob ($$$$) {
 	my ($oid, $type, $size, $expect_oid) = @_;
 	if ($type ne 'blob') {
@@ -245,10 +237,6 @@ sub cur_ibx_xnum ($$) {
 	my ($req, $bref) = @_;
 	my $ibx = $req->{ibx} or die 'BUG: current {ibx} missing';
 
-	# XXX overkill?
-	git_blob_digest($bref)->hexdigest eq $req->{oid} or die
-		"BUG: blob mismatch $req->{oid}";
-
 	$req->{eml} = PublicInbox::Eml->new($bref);
 	$req->{chash} = content_hash($req->{eml});
 	$req->{mids} = mids($req->{eml});

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] extindex: random cleanups
@ 2020-12-07  7:40  5% Eric Wong
  2020-12-07  7:40  7% ` [PATCH 3/5] extsearchidx: remove needless SHA-1 check Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-12-07  7:40 UTC (permalink / raw)
  To: meta

Still working on --reindex, but found a bunch of cleanups
and tweaks which are worth doing in any case.

Eric Wong (5):
  over: gracefully show invalid ibx_id
  overidx: wrap eidx_key => ibx_id mapping
  extsearchidx: remove needless SHA-1 check
  searchidx: remove $oid parameter from most calls
  shard_add_eidx_info: pass $eidx_key instead of $ibx object

 lib/PublicInbox/ExtSearchIdx.pm   | 27 +++++-----------------
 lib/PublicInbox/Over.pm           |  1 +
 lib/PublicInbox/OverIdx.pm        | 10 +++++---
 lib/PublicInbox/SearchIdx.pm      | 38 +++++++++++++------------------
 lib/PublicInbox/SearchIdxShard.pm | 38 ++++++++++++++-----------------
 lib/PublicInbox/V2Writable.pm     |  2 +-
 6 files changed, 48 insertions(+), 68 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-12-07  7:40  5% [PATCH 0/5] extindex: random cleanups Eric Wong
2020-12-07  7:40  7% ` [PATCH 3/5] extsearchidx: remove needless SHA-1 check Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).