This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Decimal mutex import breakout use row instead of range #260
Open
jaffee
wants to merge
13
commits into
FeatureBaseDB:master
Choose a base branch
from
jaffee:decimal-mutex-import-breakout-use-row-instead-of-range
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Decimal mutex import breakout use row instead of range #260
jaffee
wants to merge
13
commits into
FeatureBaseDB:master
from
jaffee:decimal-mutex-import-breakout-use-row-instead-of-range
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go-pilosa can now create decimal type fields — this functionality is currently only available in Molecula's Pilosa fork. expose import code so that the batch importer can use it to import to mutex fields. Allow mutex fields in the batch importer. For some reason go-pilosa was still generating deprecated "Range" queries instead of "Row", so put a stop to that.
This was causing the same shard to be used by import requests which were supposed to use different shards. A very sinister bug.
There was a deadlock which @tgruben found in detectClusterChanges where it could acquire a lock and never release it if there were no indexes or shards. TranslateKeys requests fail if the slice of keys is empty. We now test for this condition and return an empty slice of uint64 without hitting Pilosa. In importbatch, if a nil is encountered and the field is not an integer or decimal field, there is no way of knowing if this value will be using []string normally, or string or uint64. Instead of unconditionally appending to rowIDs, we wait until we know which value type this will be (as soon as we receive a non-nil value). Then we nil-extend rowIDs for this field if necessary. We now support []uint64 in addition to []string in importbatch — this is analagous to supporting strings and uint64, and they can be intermixed in the same value field. Also changed the way that indexes and fields are encoded to strings because a test was breaking due to the addition of a mutex to the Index. I don't think this affects much of anything.
use in importbatch
a lot of this logging should probably be tracing the toTranslateID change became necessary because although IDs were coming in roughly sorted, they were getting randomized by the map. This was fine until the translated IDs crossed a slice boundary, and then 1000s of requests were being generated for a single batch as the value importer flipped back and forth between slices. the bug fix is explained in a comment, but basically makeFragments iterated over b.rowIDs and assumed that anything in clearRowIDs would also be in rowIDs. In this particular case, nothing had yet been added to rowIDs, so the clear was skipped.
jaffee
force-pushed
the
decimal-mutex-import-breakout-use-row-instead-of-range
branch
from
December 13, 2019 16:10
b250342
to
7e2a544
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a totally reasonable set of changes that is perfectly described by the branch name
plus the import clearing stuff.