Skip to content

Instantly share code, notes, and snippets.

Steves-MacBook-Pro:ns_server steveyen$ tail -f logs/n_1/fts.log
2016-03-16T10:21:39.875-07:00 [INFO] ctl/manager, PrepareTopologyChange, change: {9c5e270a38aa542205f25a9a3504bd85 [] topology-change-rebalance [{{8aea445c995d1da87695aced652cd56b 0 <nil>} recovery-full}] []}
2016-03-16T10:21:39.875-07:00 [INFO] ctl/manager, PrepareTopologyChange, done
2016-03-16T10:21:39.875-07:00 [INFO] ctl/manager, GetTaskList, haveTasksRev: 0, changed, rv: &service.TaskList{Rev:service.Revision{0x32}, Tasks:[]service.Task{service.Task{Rev:service.Revision{0x31}, ID:"prepare:9c5e270a38aa542205f25a9a3504bd85", Type:"task-prepared", Status:"task-running", IsCancelable:true, Progress:100, DetailedProgress:map[service.NodeID]float64(nil), Description:"prepare topology change", ErrorMessage:"", Extra:map[string]interface {}{"topologyChange":service.TopologyChange{ID:"9c5e270a38aa542205f25a9a3504bd85", CurrentTopologyRev:service.Revision(nil), Type:"topology-change-rebalance", KeepNodes:[]struct { NodeInfo service.NodeInfo "json:\"
Steves-MacBook-Pro:cbft steveyen$ make LICENSE-thirdparty.txt
./dist/go-manifest | ./dist/gen-license-thirdparty > LICENSE-thirdparty.txt
Steves-MacBook-Pro:cbft steveyen$ cat LICENSE-thirdparty.txt
# third party components / licenses
javascript/css components:
- angular
- angular-bootstrap
- angular-route
- angular-ui-tree
@steveyen
steveyen / gist:2ea1738dcc93e5c761b4
Created February 17, 2016 18:41
go vet on bleve on steve macbook
Steves-MacBook-Pro:bleve steveyen$ git log
commit 54774a9e5f1b2941e567d90d67b601d1e457c644
Author: Steve Yen <[email protected]>
Date: Tue Feb 16 22:20:44 2016 -0800
use logf to pass go vet
commit 57cd5e0ced92114744a45f5e011730bddddcfc4f
Author: Steve Yen <[email protected]>
Date: Tue Feb 9 17:29:58 2016 -0800
@steveyen
steveyen / gist:3f63ed1fe79b78876ff0
Created February 17, 2016 18:30
errcheck speedbumps
Steves-MacBook-Pro:bleve steveyen$ which -a errcheck
/Users/steveyen/go/bin/errcheck
Steves-MacBook-Pro:bleve steveyen$ ls -al ~/go/bin/errcheck
-rwxr-xr-x 1 steveyen staff 6141328 Feb 16 22:22 /Users/steveyen/go/bin/errcheck
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ pwd
/Users/steveyen/go/src/github.com/blevesearch/bleve
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ errcheck
error: failed to check packages: could not parse arguments: import ".": import relative to unknown directory
Steves-MBP:bleve steveyen$ go vet ./...
search/highlight/term_locations_test.go:343: search.Locations composite literal uses unkeyed fields
search/highlight/term_locations_test.go:365: search.Locations composite literal uses unkeyed fields
search/highlight/term_locations_test.go:388: search.Locations composite literal uses unkeyed fields
search/highlight/term_locations_test.go:414: search.Locations composite literal uses unkeyed fields
search/highlight/term_locations_test.go:440: search.Locations composite literal uses unkeyed fields
search/highlight/term_locations_test.go:466: search.Locations composite literal uses unkeyed fields
exit status 1
search/highlight/fragment_formatters/html/fragment_formatter_html_test.go:32: search.Locations composite literal uses unkeyed fields
search/highlight/fragment_formatters/html/fragment_formatter_html_test.go:67: search.Locations composite literal uses unkeyed fields
@steveyen
steveyen / gist:4bea9743685da358a560
Last active January 10, 2016 23:42
firestorm garbage collector fixes

Proposal for firestorm garbage collector (FGC) fixes...

Example data...

A simple example is a user ("user7") document changing his location field from "CA" to "VA". The KVStore will then have TermFreqRow records that would look like...

't'/1/CA/user7/10
't'/1/WA/user7/11

Above, 1 is a fieldId for the location field. "user7" is the docId. 10 and 11 are docNumbers.

@steveyen
steveyen / bleve version
Created January 5, 2016 22:05
bleve rocksdb-firestorm locked during bleve-blast
Steves-MBP:bleve steveyen$ git log | head
commit 83cd8da39445fa989a1a3b1f7b7de739bad8fcfe
Merge: e5c1af4 89d17f0
Author: Marty Schoch <[email protected]>
Date: Tue Jan 5 16:04:59 2016 -0500
Merge pull request #307 from steveyen/WIP-perf-20160105
analyze locations only if includeTermVectors enabled
Steves-MacBook-Pro:bleve steveyen$ go test ./...
ok github.com/blevesearch/bleve 0.290s
ok github.com/blevesearch/bleve/analysis 0.011s
? github.com/blevesearch/bleve/analysis/analyzers/custom_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/keyword_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/simple_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/standard_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/web [no test files]
? github.com/blevesearch/bleve/analysis/byte_array_converters/ignore [no test files]
? github.com/blevesearch/bleve/analysis/byte_array_converters/json [no test files]
/debug/pprof/goroutine?debug=2: "
goroutine636 [running]: runtime/pprof.writeGoroutineStacks(0x7f3db038a500, 0xc83aae8d90, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:516 +0x84 runtime/pprof.writeGoroutine(0x7f3db038a500, 0xc83aae8d90, 0x2, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:505 +0x46 runtime/pprof.(*Profile).WriteTo(0x12ef640, 0x7f3db038a500, 0xc83aae8d90, 0x2, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:236 +0xd4 github.com/couchbase/cbgt/rest.DiagGetPProf(0x7f3db560fa00, 0xc8200c56b0, 0xcfbef0, 0x9, 0x2) /home/couchbase/serverjenkins/workspace/watson-unix/goproj/src/github.com/couchbase/cbgt/rest/rest_diag.go:160 +0xb1 github.com/couchbase/cbgt/rest.(*DiagGetHandler).ServeHTTP.func2(0x7f3db560fa00, 0xc8200c56b0, 0xc8200127e0) /home/couchbase/serverjenkins/workspace/watson-unix/goproj/src/github.com/couchbase/cbgt/rest/rest_diag.go:70 +0x49 net/http.HandlerFunc.ServeHTTP(0xe62498, 0x7f3db560fa00, 0xc8200c56b0, 0xc8200127e0) /usr/local/go/src/net/http/server.go:1422 +0x3a git
pool := make(chan thing, size)
func Get() {
t, ok := <-pool
if !ok { return PoolClosed }
return t
}
func Return(t) {
m.lock()