Skip to content

Commit

Permalink
enhance: rename log as streaming
Browse files Browse the repository at this point in the history
Signed-off-by: chyezh <chyezh@outlook.com>
  • Loading branch information
chyezh committed Jun 19, 2024
1 parent 825a845 commit 91e5586
Show file tree
Hide file tree
Showing 57 changed files with 112 additions and 112 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ generate-mockery-chunk-manager: getdeps
generate-mockery-pkg:
$(MAKE) -C pkg generate-mockery

generate-mockery-log:
$(INSTALL_PATH)/mockery --config $(PWD)/internal/logservice/.mockery.yaml
generate-mockery-streaming:
$(INSTALL_PATH)/mockery --config $(PWD)/internal/streamingservice/.mockery.yaml

generate-mockery: generate-mockery-types generate-mockery-kv generate-mockery-rootcoord generate-mockery-proxy generate-mockery-querycoord generate-mockery-querynode generate-mockery-datacoord generate-mockery-pkg generate-mockery-log

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/proto/log.proto → internal/proto/streaming.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package milvus.proto.log;

option go_package = "github.com/milvus-io/milvus/internal/proto/logpb";
option go_package = "github.com/milvus-io/milvus/internal/proto/streamingpb";

import "milvus.proto";
import "google/protobuf/empty.proto";
Expand All @@ -25,7 +25,7 @@ message Message {
// PChannelInfo is the information of a pchannel info.
message PChannelInfo {
string name = 1; // channel name
int64 term = 2; // A monotonic increasing term, every time the channel is recovered or moved to another lognode, the term will increase by meta server.
int64 term = 2; // A monotonic increasing term, every time the channel is recovered or moved to another streamingnode, the term will increase by meta server.
int64 serverID = 3; // The log node id address of the channel.
repeated VChannelInfo vChannelInfos = 4; // PChannel related vchannels.
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package logpb
package streamingpb

import (
"google.golang.org/protobuf/types/known/emptypb"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WAL

`wal` package is the basic defination of wal interface of milvus lognode.
`wal` package is the basic defination of wal interface of milvus streamingnode.

## Project arrangement

Expand Down Expand Up @@ -41,7 +41,7 @@ All things have been done.

```
name := "your builder name"
var yourCh *logpb.PChannelInfo
var yourCh *streamingpb.PChannelInfo
opener, err := registry.MustGetBuilder(name).Build()
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package adaptor

import (
"github.com/milvus-io/milvus/internal/lognode/server/wal"
"github.com/milvus-io/milvus/internal/lognode/server/wal/walimpls"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/walimpls"
)

var _ wal.OpenerBuilder = (*builderAdaptorImpl)(nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package wal
import (
"context"

"github.com/milvus-io/milvus/internal/lognode/server/wal/walimpls"
"github.com/milvus-io/milvus/internal/proto/logpb"
"github.com/milvus-io/milvus/internal/proto/streamingpb"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/walimpls"
)

// OpenerBuilder is the interface for build wal opener.
Expand All @@ -17,7 +17,7 @@ type OpenerBuilder interface {

// OpenOption is the option for allocating wal instance.
type OpenOption struct {
Channel *logpb.PChannelInfo
Channel *streamingpb.PChannelInfo
InterceptorBuilders []walimpls.InterceptorBuilder // Interceptor builders to build when open.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package helper
import (
"go.uber.org/zap"

"github.com/milvus-io/milvus/internal/lognode/server/wal/walimpls"
"github.com/milvus-io/milvus/internal/proto/logpb"
"github.com/milvus-io/milvus/internal/proto/streamingpb"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/walimpls"
"github.com/milvus-io/milvus/pkg/log"
)

Expand All @@ -19,11 +19,11 @@ func NewWALHelper(opt *walimpls.OpenOption) *WALHelper {
// WALHelper is a helper for WAL implementation.
type WALHelper struct {
logger *log.MLogger
channel *logpb.PChannelInfo
channel *streamingpb.PChannelInfo
}

// Channel returns the channel of the WAL.
func (w *WALHelper) Channel() *logpb.PChannelInfo {
func (w *WALHelper) Channel() *streamingpb.PChannelInfo {
return w.channel
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import (

"github.com/stretchr/testify/assert"

"github.com/milvus-io/milvus/internal/lognode/server/wal/walimpls"
"github.com/milvus-io/milvus/internal/proto/logpb"
"github.com/milvus-io/milvus/internal/proto/streamingpb"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/walimpls"
)

func TestWALHelper(t *testing.T) {
h := NewWALHelper(&walimpls.OpenOption{
Channel: &logpb.PChannelInfo{
Channel: &streamingpb.PChannelInfo{
Name: "test",
Term: 1,
ServerID: 1,
VChannelInfos: []*logpb.VChannelInfo{},
VChannelInfos: []*streamingpb.VChannelInfo{},
},
})
assert.NotNil(t, h.Channel())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package registry

import (
"github.com/milvus-io/milvus/internal/lognode/server/wal"
"github.com/milvus-io/milvus/internal/lognode/server/wal/adaptor"
"github.com/milvus-io/milvus/internal/lognode/server/wal/walimpls"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/adaptor"
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/walimpls"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/milvus-io/milvus/internal/mocks/lognode/server/wal/mock_walimpls"
"github.com/milvus-io/milvus/internal/mocks/streamingnode/server/wal/mock_walimpls"
)

func TestRegister(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package wal

import (
"github.com/milvus-io/milvus/internal/util/logserviceutil/message"
"github.com/milvus-io/milvus/internal/util/logserviceutil/options"
"github.com/milvus-io/milvus/internal/util/streamingutil/message"
"github.com/milvus-io/milvus/internal/util/streamingutil/options"
)

// ReadOption is the option for reading records from the wal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package wal
import (
"context"

"github.com/milvus-io/milvus/internal/proto/logpb"
"github.com/milvus-io/milvus/internal/util/logserviceutil/message"
"github.com/milvus-io/milvus/internal/proto/streamingpb"
"github.com/milvus-io/milvus/internal/util/streamingutil/message"
)

// WAL is the WAL framework interface.
// !!! Don't implement it directly, implement walimpls.WAL instead.
type WAL interface {
// Channel returns the channel assignment info of the wal.
// Should be read-only.
Channel() *logpb.PChannelInfo
Channel() *streamingpb.PChannelInfo

// Append writes a record to the log.
Append(ctx context.Context, msg message.MutableMessage) (message.MessageID, error)
Expand Down
Loading

0 comments on commit 91e5586

Please sign in to comment.