Skip to content

Commit b154ba4

Browse files
committed
Rename module to github.com/PowerDNS/lightningstream/lmdbenv
1 parent a241744 commit b154ba4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+116
-116
lines changed

cmd/lightningstream/commands/dropshadow.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"sort"
55
"strings"
66

7+
"github.com/PowerDNS/lightningstream/config"
8+
"github.com/PowerDNS/lightningstream/lmdbenv"
9+
"github.com/PowerDNS/lightningstream/syncer"
710
"github.com/PowerDNS/lmdb-go/lmdb"
811
"github.com/pkg/errors"
912
"github.com/sirupsen/logrus"
1013
"github.com/spf13/cobra"
11-
"powerdns.com/platform/lightningstream/config"
12-
"powerdns.com/platform/lightningstream/lmdbenv"
13-
"powerdns.com/platform/lightningstream/syncer"
1414
)
1515

1616
func init() {

cmd/lightningstream/commands/dump.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import (
55
"sort"
66
"strings"
77

8+
"github.com/PowerDNS/lightningstream/config"
9+
"github.com/PowerDNS/lightningstream/lmdbenv"
10+
"github.com/PowerDNS/lightningstream/syncer"
11+
"github.com/PowerDNS/lightningstream/utils"
812
"github.com/PowerDNS/lmdb-go/lmdb"
913
"github.com/pkg/errors"
1014
"github.com/sirupsen/logrus"
1115
"github.com/spf13/cobra"
12-
"powerdns.com/platform/lightningstream/config"
13-
"powerdns.com/platform/lightningstream/lmdbenv"
14-
"powerdns.com/platform/lightningstream/syncer"
15-
"powerdns.com/platform/lightningstream/utils"
1616
)
1717

1818
var (

cmd/lightningstream/commands/experimental-pdns.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"strings"
88
"time"
99

10+
"github.com/PowerDNS/lightningstream/lmdbenv"
11+
"github.com/PowerDNS/lightningstream/lmdbenv/header"
12+
"github.com/PowerDNS/lightningstream/utils"
1013
"github.com/PowerDNS/lmdb-go/lmdb"
1114
"github.com/PowerDNS/lmdb-go/lmdbscan"
1215
"github.com/sirupsen/logrus"
1316
"github.com/spf13/cobra"
14-
"powerdns.com/platform/lightningstream/lmdbenv"
15-
"powerdns.com/platform/lightningstream/lmdbenv/header"
16-
"powerdns.com/platform/lightningstream/utils"
1717
)
1818

1919
func init() {

cmd/lightningstream/commands/experimental.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"encoding/binary"
55
"fmt"
66

7+
"github.com/PowerDNS/lightningstream/lmdbenv"
8+
"github.com/PowerDNS/lightningstream/lmdbenv/header"
9+
"github.com/PowerDNS/lightningstream/utils"
710
"github.com/PowerDNS/lmdb-go/lmdb"
811
"github.com/PowerDNS/lmdb-go/lmdbscan"
912
"github.com/sirupsen/logrus"
1013
"github.com/spf13/cobra"
11-
"powerdns.com/platform/lightningstream/lmdbenv"
12-
"powerdns.com/platform/lightningstream/lmdbenv/header"
13-
"powerdns.com/platform/lightningstream/utils"
1414
)
1515

1616
func init() {

cmd/lightningstream/commands/root.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"os/exec"
88
"time"
99

10+
"github.com/PowerDNS/lightningstream/config"
11+
"github.com/PowerDNS/lightningstream/config/logger"
1012
"github.com/pkg/errors"
1113
"github.com/sirupsen/logrus"
1214
"github.com/spf13/cobra"
13-
"powerdns.com/platform/lightningstream/config"
14-
"powerdns.com/platform/lightningstream/config/logger"
1515
)
1616

1717
const (

cmd/lightningstream/commands/snapshots.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import (
1010
"path/filepath"
1111
"time"
1212

13+
"github.com/PowerDNS/lightningstream/lmdbenv/dbiflags"
14+
"github.com/PowerDNS/lightningstream/lmdbenv/header"
15+
"github.com/PowerDNS/lightningstream/snapshot"
16+
"github.com/PowerDNS/lightningstream/utils"
1317
"github.com/PowerDNS/simpleblob"
1418
"github.com/samber/lo"
1519
"github.com/sirupsen/logrus"
1620
"github.com/spf13/cobra"
1721
"golang.org/x/exp/slices"
18-
"powerdns.com/platform/lightningstream/lmdbenv/dbiflags"
19-
"powerdns.com/platform/lightningstream/lmdbenv/header"
20-
"powerdns.com/platform/lightningstream/snapshot"
21-
"powerdns.com/platform/lightningstream/utils"
2222
)
2323

2424
func init() {

cmd/lightningstream/commands/stats.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import (
44
"fmt"
55
"sort"
66

7+
"github.com/PowerDNS/lightningstream/config"
8+
"github.com/PowerDNS/lightningstream/lmdbenv"
9+
"github.com/PowerDNS/lightningstream/lmdbenv/stats"
710
"github.com/PowerDNS/lmdb-go/lmdb"
811
"github.com/c2h5oh/datasize"
912
"github.com/pkg/errors"
1013
"github.com/sirupsen/logrus"
1114
"github.com/spf13/cobra"
12-
"powerdns.com/platform/lightningstream/config"
13-
"powerdns.com/platform/lightningstream/lmdbenv"
14-
"powerdns.com/platform/lightningstream/lmdbenv/stats"
1515
)
1616

1717
func init() {

cmd/lightningstream/commands/sync.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import (
44
"context"
55
"os"
66

7+
"github.com/PowerDNS/lightningstream/status"
8+
"github.com/PowerDNS/lightningstream/syncer"
9+
"github.com/PowerDNS/lightningstream/utils"
710
"github.com/PowerDNS/simpleblob"
811
"github.com/sirupsen/logrus"
912
"github.com/spf13/cobra"
1013
"github.com/wojas/go-healthz"
1114
"golang.org/x/sync/errgroup"
12-
"powerdns.com/platform/lightningstream/status"
13-
"powerdns.com/platform/lightningstream/syncer"
14-
"powerdns.com/platform/lightningstream/utils"
1515
)
1616

1717
var (

cmd/lightningstream/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
"powerdns.com/platform/lightningstream/cmd/lightningstream/commands"
4+
"github.com/PowerDNS/lightningstream/cmd/lightningstream/commands"
55

66
// Register storage backends
77
_ "github.com/PowerDNS/simpleblob/backends/fs"

config/config.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import (
77
"os"
88
"time"
99

10+
"github.com/PowerDNS/lightningstream/lmdbenv/dbiflags"
1011
"github.com/pkg/errors"
1112
"github.com/sirupsen/logrus"
1213
"gopkg.in/yaml.v2"
13-
"powerdns.com/platform/lightningstream/lmdbenv/dbiflags"
1414

15-
"powerdns.com/platform/lightningstream/config/logger"
16-
"powerdns.com/platform/lightningstream/lmdbenv"
17-
"powerdns.com/platform/lightningstream/status/healthtracker"
18-
"powerdns.com/platform/lightningstream/status/starttracker"
15+
"github.com/PowerDNS/lightningstream/config/logger"
16+
"github.com/PowerDNS/lightningstream/lmdbenv"
17+
"github.com/PowerDNS/lightningstream/status/healthtracker"
18+
"github.com/PowerDNS/lightningstream/status/starttracker"
1919
)
2020

2121
const (

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module powerdns.com/platform/lightningstream
1+
module github.com/PowerDNS/lightningstream
22

33
go 1.19
44

lmdbenv/stats/collector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/prometheus/client_golang/prometheus"
1212
"github.com/sirupsen/logrus"
1313

14-
"powerdns.com/platform/lightningstream/lmdbenv"
14+
"github.com/PowerDNS/lightningstream/lmdbenv"
1515
)
1616

1717
// Collector implements an LMDB stats collector for Prometheus.

lmdbenv/stats/collector_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7+
"github.com/PowerDNS/lightningstream/lmdbenv"
78
"github.com/PowerDNS/lmdb-go/lmdb"
89
"github.com/prometheus/client_golang/prometheus"
9-
"powerdns.com/platform/lightningstream/lmdbenv"
1010
)
1111

1212
func TestCollector(t *testing.T) {

lmdbenv/stats/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ package stats
44
import (
55
"os"
66

7+
"github.com/PowerDNS/lightningstream/lmdbenv"
78
"github.com/PowerDNS/lmdb-go/lmdb"
89
"github.com/pkg/errors"
910
"github.com/sirupsen/logrus"
10-
"powerdns.com/platform/lightningstream/lmdbenv"
1111
)
1212

1313
// Log logs all LMDB statistics once using logrus

lmdbenv/strategy/append_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package strategy
33
import (
44
"testing"
55

6+
"github.com/PowerDNS/lightningstream/lmdbenv"
67
"github.com/PowerDNS/lmdb-go/lmdb"
7-
"powerdns.com/platform/lightningstream/lmdbenv"
88
)
99

1010
func TestAppend(t *testing.T) {

lmdbenv/strategy/iterput_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package strategy
33
import (
44
"testing"
55

6-
"powerdns.com/platform/lightningstream/lmdbenv"
6+
"github.com/PowerDNS/lightningstream/lmdbenv"
77
)
88

99
func TestIterPut_empty(t *testing.T) {

lmdbenv/strategy/iterupdate_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package strategy
33
import (
44
"testing"
55

6-
"powerdns.com/platform/lightningstream/lmdbenv"
6+
"github.com/PowerDNS/lightningstream/lmdbenv"
77
)
88

99
func TestIterUpdate_empty(t *testing.T) {

lmdbenv/strategy/put_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package strategy
33
import (
44
"testing"
55

6-
"powerdns.com/platform/lightningstream/lmdbenv"
6+
"github.com/PowerDNS/lightningstream/lmdbenv"
77
)
88

99
func TestPut(t *testing.T) {

lmdbenv/strategy/testutil_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/PowerDNS/lmdb-go/lmdb"
1010
"github.com/pkg/errors"
1111

12-
"powerdns.com/platform/lightningstream/lmdbenv"
12+
"github.com/PowerDNS/lightningstream/lmdbenv"
1313
)
1414

1515
type TestIterator struct {

lmdbenv/strategy/update_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package strategy
33
import (
44
"testing"
55

6-
"powerdns.com/platform/lightningstream/lmdbenv"
6+
"github.com/PowerDNS/lightningstream/lmdbenv"
77
)
88

99
// Test iterator does not do dedup!

snapshot/doc.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ In total that is 440 MB data uncompressed. It turns out that half of the
2222
allocation was used by the code copying all key and value bytes.
2323
2424
flat flat% sum% cum cum%
25-
2047.55MB 56.26% 56.26% 2722.09MB 74.80% powerdns.com/platform/lightningstream/snapshot.(*DBI).Unmarshal
26-
674.54MB 18.54% 98.45% 674.54MB 18.54% powerdns.com/platform/lightningstream/snapshot.(*KV).Unmarshal
25+
2047.55MB 56.26% 56.26% 2722.09MB 74.80% github.com/PowerDNS/lightningstream/snapshot.(*DBI).Unmarshal
26+
674.54MB 18.54% 98.45% 674.54MB 18.54% github.com/PowerDNS/lightningstream/snapshot.(*KV).Unmarshal
2727
2828
Patching the generated code to not copy the data reduced the total memory use to
2929
1.4 GB:
3030
31-
1378.77MB 52.20% 52.20% 1378.77MB 52.20% powerdns.com/platform/lightningstream/snapshot.(*DBI).Unmarshal
31+
1378.77MB 52.20% 52.20% 1378.77MB 52.20% github.com/PowerDNS/lightningstream/snapshot.(*DBI).Unmarshal
3232
3333
That is still significantly more than the 440 MB we would expect. Part of it
3434
is likely because the allocated slices are up to 2x larger than needed with

snapshot/flags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package snapshot
22

3-
import "powerdns.com/platform/lightningstream/lmdbenv/header"
3+
import "github.com/PowerDNS/lightningstream/lmdbenv/header"
44

55
func (kv *KV) MaskedFlags() header.Flags {
66
return header.Flags(kv.Flags).Masked()

snapshot/gogosnapshot/compat_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"math/rand"
77
"testing"
88

9+
"github.com/PowerDNS/lightningstream/snapshot"
910
"github.com/stretchr/testify/assert"
10-
"powerdns.com/platform/lightningstream/snapshot"
1111
)
1212

1313
func Test_roundtrip_compat_generated(t *testing.T) {
@@ -31,15 +31,15 @@ func Test_roundtrip_compat_manual(t *testing.T) {
3131
},
3232
Databases: []*DBI{
3333
{
34-
Name: "test-dbi-1",
34+
Name: "test-dbi-1",
3535
Entries: []KV{
3636
// Filled below
3737
},
3838
Flags: 0,
3939
Transform: "",
4040
},
4141
{
42-
Name: "test-dbi-2",
42+
Name: "test-dbi-2",
4343
Entries: []KV{
4444
// Filled below
4545
},

snapshot/name.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"strings"
88
"time"
99

10-
"powerdns.com/platform/lightningstream/lmdbenv/header"
11-
"powerdns.com/platform/lightningstream/utils"
10+
"github.com/PowerDNS/lightningstream/lmdbenv/header"
11+
"github.com/PowerDNS/lightningstream/utils"
1212
)
1313

1414
const (

status/httpd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/sirupsen/logrus"
1414
"github.com/wojas/go-healthz"
1515

16-
"powerdns.com/platform/lightningstream/config"
16+
"github.com/PowerDNS/lightningstream/config"
1717
)
1818

1919
func StartHTTPServer(c config.Config) {

status/status.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"context"
55
"sync"
66

7+
"github.com/PowerDNS/lightningstream/lmdbenv"
8+
"github.com/PowerDNS/lightningstream/lmdbenv/dbiflags"
9+
"github.com/PowerDNS/lightningstream/lmdbenv/stats"
710
"github.com/PowerDNS/lmdb-go/lmdb"
811
"github.com/PowerDNS/simpleblob"
912
"github.com/c2h5oh/datasize"
1013
"github.com/pkg/errors"
11-
"powerdns.com/platform/lightningstream/lmdbenv"
12-
"powerdns.com/platform/lightningstream/lmdbenv/dbiflags"
13-
"powerdns.com/platform/lightningstream/lmdbenv/stats"
1414
)
1515

1616
type info struct {

syncer/cleaner/cleaner.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import (
55
"sync"
66
"time"
77

8+
"github.com/PowerDNS/lightningstream/config"
9+
"github.com/PowerDNS/lightningstream/snapshot"
10+
"github.com/PowerDNS/lightningstream/utils"
811
"github.com/PowerDNS/simpleblob"
912
"github.com/samber/lo"
1013
"github.com/sirupsen/logrus"
1114
"golang.org/x/exp/slices"
12-
"powerdns.com/platform/lightningstream/config"
13-
"powerdns.com/platform/lightningstream/snapshot"
14-
"powerdns.com/platform/lightningstream/utils"
1515
)
1616

1717
func New(name string, st simpleblob.Interface, cc config.Cleanup, logger logrus.FieldLogger) *Worker {

syncer/cleaner/cleaner_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"testing"
77
"time"
88

9+
"github.com/PowerDNS/lightningstream/config"
10+
"github.com/PowerDNS/lightningstream/snapshot"
911
"github.com/PowerDNS/simpleblob/backends/memory"
1012
"github.com/sirupsen/logrus"
1113
"github.com/stretchr/testify/assert"
12-
"powerdns.com/platform/lightningstream/config"
13-
"powerdns.com/platform/lightningstream/snapshot"
1414
)
1515

1616
func mt(timeString string) time.Time {

syncer/dupsorthack.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"bytes"
55
"fmt"
66

7-
"powerdns.com/platform/lightningstream/snapshot"
8-
"powerdns.com/platform/lightningstream/utils"
7+
"github.com/PowerDNS/lightningstream/snapshot"
8+
"github.com/PowerDNS/lightningstream/utils"
99
)
1010

1111
const (

0 commit comments

Comments
 (0)