Skip to content

Conversation

mask-pp
Copy link
Contributor

@mask-pp mask-pp commented Jan 13, 2023

Co-authored-by: HAOYUatHZ [email protected]
Since the trace does not need to be stored all the time, I understand it as just putting it in the cache, so the system is strongly dependent on the cache, what is your point? Welcome to give comments :)

Changes:

  1. Add api(GetTracesByBatchIndex) in bridge.l2 module.
  2. Add redis cache in database, cache the trace content.

Co-authored-by: HAOYUatHZ <[email protected]>
@mask-pp mask-pp marked this pull request as draft January 13, 2023 02:08
@mask-pp mask-pp marked this pull request as ready for review January 16, 2023 07:18
@mask-pp
Copy link
Contributor Author

mask-pp commented Jan 28, 2023

The CI may fail sometimes, here's the log:

    mock.go:86: 
        	Error Trace:	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/mock.go:86
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:25
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46
        	Error:      	Received unexpected error:
        	            	failed to start image: redis
        	Test:       	TestMigrate
    mock.go:89: 
        	Error Trace:	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/mock.go:89
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:25
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46
        	Error:      	Received unexpected error:
        	            	redis: invalid URL scheme: 
        	Test:       	TestMigrate
--- FAIL: TestMigrate (11.65s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xfac5b3]

goroutine 108 [running]:
testing.tRunner.func1.2({0x10963e0, 0x19713a0})
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1389 +0x366
testing.tRunner.func1()
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1392 +0x5d2
panic({0x10963e0, 0x19713a0})
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/runtime/panic.go:844 +0x258
scroll-tech/database/migrate.initEnv(0x4807b9?)
	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:35 +0x133
scroll-tech/database/migrate.TestMigrate(0xc000602d00)
	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46 +0x31
testing.tRunner(0xc000602d00, 0x135d8c8)
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1439 +0x214
created by testing.(*T).Run
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1486 +0x725
FAIL	scroll-tech/database/migrate	12.110s
?   	scroll-tech/database/orm	[no test files]
FAIL
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Test database package

Thx, and could you give me the link to get more detail.

@colinlyguo
Copy link
Contributor

colinlyguo commented Jan 28, 2023

The CI may fail sometimes, here's the log:

    mock.go:86: 
        	Error Trace:	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/mock.go:86
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:25
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46
        	Error:      	Received unexpected error:
        	            	failed to start image: redis
        	Test:       	TestMigrate
    mock.go:89: 
        	Error Trace:	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/mock.go:89
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:25
        	            				/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46
        	Error:      	Received unexpected error:
        	            	redis: invalid URL scheme: 
        	Test:       	TestMigrate
--- FAIL: TestMigrate (11.65s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xfac5b3]

goroutine 108 [running]:
testing.tRunner.func1.2({0x10963e0, 0x19713a0})
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1389 +0x366
testing.tRunner.func1()
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1392 +0x5d2
panic({0x10963e0, 0x19713a0})
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/runtime/panic.go:844 +0x258
scroll-tech/database/migrate.initEnv(0x4807b9?)
	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:35 +0x133
scroll-tech/database/migrate.TestMigrate(0xc000602d00)
	/var/lib/jenkins/workspace/scroll-tests/scroll/database/migrate/migrate_test.go:46 +0x31
testing.tRunner(0xc000602d00, 0x135d8c8)
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1439 +0x214
created by testing.(*T).Run
	/var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.18/src/testing/testing.go:1486 +0x725
FAIL	scroll-tech/database/migrate	12.110s
?   	scroll-tech/database/orm	[no test files]
FAIL
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Test database package

Thx, and could you give me the link to get more detail.

The link: http://jenkins.scroll.tech:8080/job/scroll-tests/job/scroll/2797/console

colinlyguo
colinlyguo previously approved these changes Jan 28, 2023
Copy link
Contributor

@colinlyguo colinlyguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ChuhanJin
Copy link
Contributor

47% (+0.54%) vs master 46%

@ChuhanJin
Copy link
Contributor

47% (+0.47%) vs master 46%

0xmountaintop
0xmountaintop previously approved these changes Jan 28, 2023
colinlyguo
colinlyguo previously approved these changes Jan 28, 2023
silathdiir
silathdiir previously approved these changes Jan 28, 2023
@0xmountaintop 0xmountaintop dismissed stale reviews from silathdiir, colinlyguo, and themself via 5823282 January 29, 2023 01:30
@ChuhanJin
Copy link
Contributor

47% (+0.47%) vs master 46%

@scroll-dev scroll-dev merged commit b5549f6 into staging Jan 29, 2023
@scroll-dev scroll-dev deleted the cache_redis branch January 29, 2023 01:56
Thegaram added a commit that referenced this pull request Jan 31, 2023
…d trace api in bridge.l2backend. (#228)"

This reverts commit b5549f6.
Thegaram added a commit that referenced this pull request Jan 31, 2023
…d trace api in bridge.l2backend. (#228)"

This reverts commit b5549f6.
Lawliet-Chan added a commit that referenced this pull request Jan 31, 2023
…d trace api in bridge.l2backend. (#228)"

This reverts commit b5549f6.
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.

6 participants