-
Notifications
You must be signed in to change notification settings - Fork 74
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
optimize layer storage format for mem size and perf #1877
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
25a337b
WIP
invisig0th dce2f57
Merge branch 'master' into visi-layerv3
invisig0th 57741c3
Remove unused variables and comments
jnwatson a5bbd43
remove old migration tools
invisig0th 3e72cdf
merged from master
invisig0th 368eb8d
Merge branch 'master' into visi-layerv3
invisig0th 9e48001
remove 2.0 migration sync service
invisig0th 32165d2
Merge branch 'master' into visi-layerv3
invisig0th 8f8b091
added migration test and mop-up fix
invisig0th 0d294c5
Merge branch 'master' into visi-layerv3
invisig0th fadf09a
removed vestigial test code
invisig0th 300e806
Merge branch 'visi-layerv3' of https://github.com/vertexproject/synap…
invisig0th 93261b4
Merge branch 'master' into visi-layerv3
invisig0th a641565
Merge branch 'master' into visi-layerv3
invisig0th File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -661,35 +661,17 @@ async def test_layer_stortype_merge(self): | |
nodes = await core.nodes('inet:ipv4=1.2.3.4 [ +#foo.bar=2015 ]') | ||
self.eq((1325376000000, 1420070400001), nodes[0].getTag('foo.bar')) | ||
|
||
nodeedits = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC this tested applying node edits and showing that the results of applying edits without changes resulted in a empty set of changes. I guess this would be OBE with the sode format change. |
||
(buid, None, ( | ||
(s_layer.EDIT_PROP_SET, ('loc', 'us', None, s_layer.STOR_TYPE_LOC), ()), | ||
)), | ||
] | ||
|
||
nodeedits_out = await layr.storNodeEdits(nodeedits, {}) | ||
self.notin('loc', nodeedits_out[0][1]['props']) | ||
|
||
nodeedits = [ | ||
(buid, None, ( | ||
(s_layer.EDIT_TAG_SET, ('faz.baz', (None, None), (None, None)), ()), | ||
)), | ||
] | ||
|
||
nodeedits_out = await layr.storNodeEdits(nodeedits, {}) | ||
self.notin('faz.baz', nodeedits_out[0][1]['tags']) | ||
|
||
async def test_layer_nodeedits_created(self): | ||
|
||
async with self.getTestCore() as core: | ||
|
||
nodes = await core.nodes('[ test:int=1 :loc=us ]') | ||
created00 = nodes[0].get('.created') | ||
self.nn(created00) | ||
|
||
layr = core.getLayer() | ||
|
||
editlist00 = [nes async for nes in layr.iterLayerNodeEdits()] | ||
|
||
await core.nodes('test:int=1 | delnode') | ||
self.len(0, await core.nodes('test:int')) | ||
|
||
|
@@ -710,7 +692,7 @@ async def test_layer_nodeedits_created(self): | |
|
||
# If meta is not specified .created gets populated to now | ||
await asyncio.sleep(0.01) | ||
await layr.storNodeEdits(nexslist00, None) | ||
await layr.storNodeEdits(nexslist00, {}) | ||
|
||
nodes = await core.nodes('test:int') | ||
self.len(1, nodes) | ||
|
@@ -994,3 +976,17 @@ async def test_layer_clone(self): | |
|
||
readlayr = core.getLayer(readlayrinfo.get('iden')) | ||
self.true(readlayr.readonly) | ||
|
||
async def test_layer_v3(self): | ||
|
||
async with self.getRegrCore('2.0-layerv2tov3') as core: | ||
|
||
nodes = await core.nodes('inet:ipv4=1.2.3.4') | ||
self.len(1, nodes) | ||
self.eq(nodes[0].ndef, ('inet:ipv4', 0x01020304)) | ||
self.eq(nodes[0].get('asn'), 33) | ||
self.true(nodes[0].getTag('foo.bar'), (None, None)) | ||
self.true(nodes[0].getTagProp('foo.bar', 'confidence'), 22) | ||
|
||
for layr in core.layers.values(): | ||
self.eq(layr.layrvers, 3) |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no todos in mainline code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err fixmes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a question about how many results one could have that whiff in the continue block or not. that's really the question about yielding here.