Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-3288-import: Pass context to import filter function #6383

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Aug 24, 2023

CBG-3288

Extends CBG-3288 functionality to include import filter function logging

Dependencies (if applicable)

Example Output

function(doc){
  console.log(JSON.stringify(doc))
  return true
}
2023-08-24T16:06:42.119+01:00 [DBG] Import+: db:db1 Attempting to import doc "<ud>1692617217</ud>"...
2023-08-24T16:06:42.119+01:00 [DBG] CRUD+: db:db1 Doc <ud>1692617217</ud> is not an SG write, based on cas and body hash. cas:177e5a1fb20e0000 syncCas:"0x0000c72764627d17"
2023-08-24T16:06:42.135+01:00 [INF] Javascript: db:db1 Import <ud>{"foo":"bar","update":true}</ud>
2023-08-24T16:06:42.135+01:00 [DBG] Import+: db:db1 Created new rev ID for doc "<ud>1692617217</ud>" / "2-6e761063eb811c4a77d50b73bea57d77"
2023-08-24T16:06:42.135+01:00 [DBG] CRUD+: db:db1 Invoking sync on doc "<ud>1692617217</ud>" rev 2-6e761063eb811c4a77d50b73bea57d77
2023-08-24T16:06:42.143+01:00 [INF] Javascript: db:db1 Sync <ud>{"_id":"1692617217","_rev":"2-6e761063eb811c4a77d50b73bea57d77","foo":"bar","update":true}</ud>
2023-08-24T16:06:42.143+01:00 [DBG] CRUD+: db:db1 Saving doc (seq: #1427, id: <ud>1692617217</ud> rev: 2-6e761063eb811c4a77d50b73bea57d77)
2023-08-24T16:06:42.143+01:00 [DBG] CRUD+: db:db1 Stored doc "<ud>1692617217</ud>" / "2-6e761063eb811c4a77d50b73bea57d77" as #1427
2023-08-24T16:06:42.143+01:00 [DBG] Import+: db:db1 Imported <ud>1692617217</ud> (delete=false) as rev 2-6e761063eb811c4a77d50b73bea57d77
2023-08-24T16:06:42.143+01:00 [DBG] DCP+: db:db1 Received #1427 after   0ms ("<ud>1692617217</ud>" / "2-6e761063eb811c4a77d50b73bea57d77")
2023-08-24T16:06:42.144+01:00 [DBG] Changes+: db:db1 Notifying that "b1" changed (keys="{0.<ud>*</ud>}") count=2

Integration Tests

torcolvin
torcolvin previously approved these changes Aug 24, 2023
adamcfraser
adamcfraser previously approved these changes Aug 24, 2023
Base automatically changed from CBG-3288 to master August 24, 2023 16:03
@bbrks bbrks dismissed stale reviews from adamcfraser and torcolvin August 24, 2023 16:03

The base branch was changed.

@bbrks bbrks force-pushed the CBG-3288-import_filter branch from 47c682f to 7e3b15c Compare August 24, 2023 16:04
@bbrks bbrks requested a review from torcolvin August 24, 2023 16:04
@bbrks bbrks enabled auto-merge (squash) August 24, 2023 16:06
@bbrks bbrks merged commit 3b3d1a7 into master Aug 24, 2023
@bbrks bbrks deleted the CBG-3288-import_filter branch August 24, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants