Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
543c24d0
Unverified
Commit
543c24d0
authored
7 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
Remove fingerprint versioning stuff from sync scheduling PR
parent
25095866
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/sync/interface.clj
+0
-33
0 additions, 33 deletions
src/metabase/sync/interface.clj
with
0 additions
and
33 deletions
src/metabase/sync/interface.clj
+
0
−
33
View file @
543c24d0
...
...
@@ -101,36 +101,3 @@
(
s/optional-key
:global
)
GlobalFingerprint
(
s/optional-key
:type
)
TypeSpecificFingerprint
(
s/optional-key
:experimental
)
{
s/Keyword
s/Any
}})
;;; +------------------------------------------------------------------------------------------------------------------------+
;;; | FINGERPRINT VERSIONING |
;;; +------------------------------------------------------------------------------------------------------------------------+
;; Occasionally we want to update the schema of our Field fingerprints and add new logic to populate the additional keys.
;; However, by default, analysis (which includes fingerprinting) only runs on *NEW* Fields, meaning *EXISTING* Fields won't
;; get new fingerprints with the updated info.
;;
;; To work around this, we can use a versioning system. Fields whose Fingerprint's version is lower than the current version
;; should get updated during the next sync/analysis regardless of whether they are or are not new Fields. However, this could
;; be quite inefficient: if we add a new fingerprint field for `:type/Number` Fields, why should we re-fingerprint `:type/Text`
;; Fields? Ideally, we'd only re-fingerprint the numeric Fields.
;;
;; Thus, our implementation below. Each new fingerprint version lists a set of types that should be upgraded to it. Our
;; fingerprinting logic will calculate whether a fingerprint needs to be recalculated based on its version and the changes
;; that have been made in subsequent versions. Only the Fields that would benefit from the new Fingerprint info need be
;; re-fingerprinted.
;;
;; Thus, if Fingerprint v2 contains some new info for numeric Fields, only Fields that derive from `:type/Number` need be upgraded
;; to v2. Textual Fields with a v1 fingerprint can stay at v1 for the time being. Later, if we introduce a v3 that includes new
;; "global" fingerprint info, both the v2-fingerprinted numeric Fields and the v1-fingerprinted textual Fields can be upgraded
;; to v3.
(
def
^
:const
^
Integer
current-fingerprint-version
"The current version of our Field fingerprint. See comments above for explanation of how this is used."
2
)
(
def
fingerprint-version->types-that-should-be-re-fingerprinted
"Map of fingerprint version to the set of Field base types that need to be upgraded to this version the next
time we do analysis."
{
2
#
{
:type/Number
}})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment