Commit graph

7880 commits

Author SHA1 Message Date
Todd Gruben
2ddcbce8ad fix govet and gofmt errors in existing code 2021-10-29 13:14:27 -05:00
Todd Gruben
8af9cfbb7d removed --new check 2021-10-29 13:14:27 -05:00
Todd Gruben
396e1e6433 . 2021-10-29 13:14:27 -05:00
Todd Gruben
21283e123f remove timeout 2021-10-29 13:14:27 -05:00
Todd Gruben
ac3445b8a5 disable lint on circleci 2021-10-29 13:14:27 -05:00
Todd Gruben
6d6cf655c5 clean gofmt 2021-10-29 13:14:27 -05:00
Todd Gruben
36fa27e2a2 limit linters to only specified 2021-10-29 13:14:27 -05:00
Todd Gruben
113c6bc21a cleanup gofmt 2021-10-29 13:14:27 -05:00
Todd Gruben
2b03c97a38 only run latest try2 2021-10-29 13:14:27 -05:00
Todd Gruben
d1baac6239 only check for new issues 2021-10-29 13:14:27 -05:00
Todd Gruben
f4a47346b0 add golangci-lint to gitlab pipeline. Currently gofmt and govet 2021-10-29 13:14:27 -05:00
Todd Gruben
7e14008ed8 add golangci-lint to gitlab container 2021-10-29 13:14:27 -05:00
seebs
84f6a5570f
Merge pull request #1747 from molecula/gopsutilupg
uprev gopsutil
2021-10-29 12:14:11 -05:00
Seebs
360f161303 uprev gopsutil
The old revision emits a warning on MacOS X that looks concerning, and
even though it's actually mostly-harmless, it is an annoyance.

Also run `go mod tidy` which affected go.sum.
2021-10-28 14:08:13 -05:00
Matthew Jaffee
06714aa601
Merge pull request #1744 from molecula/SUP-76-stop-fsyncs
don't fsync on RBF Open if WAL is empty
2021-10-28 13:20:41 -05:00
Matthew Jaffee
c3e14cb9ae don't fsync on RBF Open if WAL is empty
This is targeted at reducing startup times, especially on OSX where
the fsync calls seem to be taking an egregiously long time. I got one
index to go from ~1min to open to ~1sec. This looks safe to me, but
will get opinions from RBF experts.
2021-10-28 09:43:32 -05:00
reese
115b1a9c6a
Merge pull request #1742 from molecula/sup-81
remove shards list from error message entirely
2021-10-28 09:42:57 -05:00
reesporte
968ce78c73 remove ShardSlice entirely 2021-10-27 17:05:56 -05:00
reesporte
bc44f9b8d1 remove shards list from error message entirely 2021-10-27 16:45:17 -05:00
reese
469791a670
Merge pull request #1739 from molecula/sup-81
[SUP-81] wrap shards list in ShardSlice for prettier output in error messages
2021-10-26 16:04:48 -05:00
reesporte
eb8460c291 wrap shards in error message as ShardSlice for pretty output 2021-10-26 15:39:52 -05:00
reesporte
7c885c8130 export ShardSlice 2021-10-26 15:39:06 -05:00
seebs
6cb9ce0315
Merge pull request #1731 from molecula/core930
[FB-930] remove bolt backend, bluegreentx, and a ton of unused API surface
2021-10-26 13:37:16 -05:00
Seebs
ad30a926f4 Giant Commit: drop a bunch of stuff we don't use.
These commits are hard to disentagle, and doing them separately means
re-modifying the same chunks of code several times before removing it,
and similar things.

Basically:
(1) Drop the bolt backend storage.
(2) Drop the blue-green wrapper that compares two backends.
(3) Drop unused or barely-used Tx API components from all the
remaining backends.
(4) Minor related cleanup to simplify things related to these.

The boltdb backend existed only to verify RBF. The blue-green wrapper
was mostly used to verify RBF, but in practice we had to do a lot
of working around that, and it introduced a lot of special cases.

Types removed:

IteratorFinder: Used only to implement the roaring iterator
on top of boltdb, and to complicate the way it worked in roaring.
Reverted the complications. Also unexport NewSliceContainers
which is used only for that outside of roaring's internals.

PortMapper from cluster_internal_test.go: Used only for a test
we removed early this year. Never used for anything else.

RawRoaringData: Totally unused.

TxStore: Totally unused.

Functions removed from Tx API, and sometimes corresponding
members were removed from structs:

* Dump: debugging code, I don't think I found any actually reachable
  paths to it.
* Group: only used for debugging TxGroup stuff
* IncrementOpN: only used by fragment, fragment can increment its
  own opN.
* Options: unused?
* Pointer: debugging only
* Readonly: used only to decide how to handle Tx in a TxGrp,
  but we never add a non-readonly Tx to a TxGrp. Removed also all
  the corresponding write-aware stuff.
* RoaringBitmapReader: Used exactly once, can just be a bm.WriteTo.
* Sn (and OpenSnList): Unused
* UnionInPlace: unused and conceptually-invalid; it didn't write
  to storage and shouldn't have, and was just "create a bitmap
  then call union-in-place", which we can do directly.
* UseRowCache: just checked storage.UseRowCache.

Other things removed:

The SetRequiredForAtomicWriteTx and ClearRequiredForAtomicWriteTx
functions go away, since nothing now seems to be using them? Same
for holder_internal_test's `testHasBit` and `testMustNotHaveBit`,
which were unused.

The DBPerShard "DeleteDBPath" and "HasData" functions and related
parts were mostly unused; took out the parts that were never
actually being reached.

Changed the API of one function to simplify special cases and
remove things:
* ImportRoaringBits had a special "data" argument which gave it
  subtly different semantics for RBF and roaring (for roaring, it
  could produce a roaring bitmap *with ops log*), didn't seem to
  be adding much. Removed corresponding "readStorageFromArchive"
  which is not otherwise used.

Also took out various debugging/dumping functions that were unused
and may have bitrotted.

Dropped a test from txfactory_internal_test, and the "pjobs"
code, because those two were the only things that needed Barrier
and thus idem, which lets us drop two more dependencies. We already
have errgroup for grouping things which want to terminate as
soon as one of them errors, approximately. To do better we'd have
to have context-threading, really.

Unbroke the WriteFragment test for non-roaring tests and made it
not roaring-only.
2021-10-26 12:30:25 -05:00
Seebs
ecd0ecc6d1 add featurebase to .gitignore
we ignored pilosa binaries but we've renamed so now the binary is named
featurebase.
2021-10-26 09:15:44 -05:00
Seebs
dc8702ea3e use testhook auditor to track Qcx open/close
This also requires doing something to keep the TxGroup in each Qcx
from holding its Tx references after the Qcx closes, because otherwise
the list of Qcxs that we keep to verify that they all got closed ends
up keeping every shared/read-only Tx open forever, resulting in many
gigabytes of memory usage when running with the race detector.  To
avoid having to reason about whether anything would ever access a nil
TxGroup, or run through iteratively zeroing maps, we just make a new
empty group at that point.
2021-10-26 09:13:53 -05:00
reese
53b7d9e210
Merge pull request #1736 from molecula/time-estimate-rules
SUP-75: Change time estimation to use avg time per message
2021-10-25 15:42:09 -05:00
reesporte
d51c6b950f meaningless commit to kick off sonarcloud with new rules 2021-10-25 15:24:55 -05:00
reesporte
d934d117da add test case names 2021-10-22 14:52:57 -05:00
reesporte
5dd4b0e048 rename vars to more sensible names 2021-10-22 14:49:05 -05:00
reesporte
bd0d68b2fd rename function, return pctDone 2021-10-22 12:54:46 -05:00
reesporte
681ed9923d add license header 2021-10-22 11:29:09 -05:00
reesporte
0f108a612d refactor and add unit tests 2021-10-22 11:25:03 -05:00
reesporte
45e36600f3 don't include .*.swp 2021-10-22 10:49:07 -05:00
reesporte
7102de9f60 off by one error fixed 2021-10-21 16:19:57 -05:00
reesporte
27515a3f98 number of sent messages is just i silly 2021-10-21 14:24:27 -05:00
reesporte
adf3e528f5 Change time estimation to use avg time per message
In [SUP-75](https://molecula.atlassian.net/browse/SUP-75?atlOrigin=eyJpIjoiYmU5MzdkMmUyZTAyNGQ2Y2IzMDMzYTgzMDU2Y2ZhNmMiLCJwIjoiaiJ9) Allen
pointed out that the time estimation is really good for the first couple lines of output, but gets exponentially worse as execution continues.

After looking into it, it looks like we’re currently using a heuristic based on the amount of messages processed in the previous
second(ish) which is what results in that sort of exponential drop off.

To remedy this, I adjusted the time estimation calculation to use the average time per message up to the point of calculating the new
estimate to ideally improve estimates over time, with the trade-off of a potentially less accurate estimate to begin with.
2021-10-21 13:09:24 -05:00
Fletcher Haynes
3605449b53
Merge pull request #1734 from molecula/gitlab
Migrated Cloud Build to GitLab
2021-10-15 10:07:31 -07:00
Fletcher Haynes
72a2689e4c Migrated Cloud Build to GitLab
This adds in a config YAML file for gitlab
2021-10-14 18:37:06 -07:00
nagamocha3000
263a5b86c9
Merge pull request #1733 from nagamocha3000/core-919-field-deadlock
CORE-919 Fix deadlock on field recreation after node restart
2021-10-14 18:20:25 +03:00
nagamocha3000
c6b7089332 Add comment as to why we are using os.Exit instead of panic 2021-10-14 18:07:02 +03:00
nagamocha3000
bce008df26 Fix deadlock on delete then recreate field after node restart 2021-10-14 17:04:09 +03:00
nagamocha3000
07a340ba9d Add test for deadlock on field recreation 2021-10-13 23:11:56 +03:00
tgruben
9d2d30feb7
Merge pull request #1718 from tgruben/sql2-type
Better type support in result set for looker (postgres) sql2 interface
2021-10-12 12:36:15 -05:00
Todd Gruben
4d4f64a339 address ben's comments 2021-10-12 11:21:14 -05:00
Todd Gruben
5d57d361f4 quite down 2021-10-12 10:50:03 -05:00
Todd Gruben
e4e0d13837 go mod tidy correction? 2021-10-12 10:40:32 -05:00
Todd Gruben
c4c7d91bf0 make linker happy 2021-10-12 10:24:19 -05:00
Todd Gruben
34dad863e2 wip 2021-10-12 10:20:24 -05:00
Todd Gruben
caee5680c3 wip 2021-10-12 10:20:24 -05:00