Skip to content
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

client: implement API to get sequence numbers of the first and last log entries for the specific log stream #239

Closed
ijsong opened this issue Nov 24, 2022 · 0 comments · Fixed by #240 or #252
Assignees

Comments

@ijsong
Copy link
Member

ijsong commented Nov 24, 2022

Currently, the client provides APIs to fetch the metadata of the log stream replica (e.g., LogStreamMetadata, LogStreamReplicaMetadata). Typically, users of the varlog (e.g., KOV) use them to acquire the log sequence number of the first and last log entries. However, it is not good practice due to the followings:

  • LogStreamMetadata and LogStreamReplicaMetadata contain useless information for users who want to write log entries.
  • LogStreamMetadata and LogStreamReplicaMetadata provide too detailed information to non-privileged users.
  • LogStreamMetadata and LogStreamReplicaMetadata do not consider the status of log stream replicas: a replica in SEALING status does not have the correct log sequence number of the last log entry.

This issue is similar to #232. I think that #232 can be implemented by using this.

@ijsong ijsong self-assigned this Nov 24, 2022
ijsong added a commit to ijsong/varlog that referenced this issue Nov 24, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It accounts for the status of log stream replicas; thus, it returns more accurate first and last
  log sequence numbers of the log stream.

Resolves kakao#239
ijsong added a commit to ijsong/varlog that referenced this issue Nov 24, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It accounts for the status of log stream replicas; thus, it returns more accurate first and last
  log sequence numbers of the log stream.

Resolves kakao#239
ijsong added a commit to ijsong/varlog that referenced this issue Nov 24, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It takes accounts for the status of log stream replicas; thus, it returns more accurate first and
  last log sequence numbers of the log stream.

Resolves kakao#239
ijsong added a commit to ijsong/varlog that referenced this issue Nov 24, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It takes accounts for the status of log stream replicas; thus, it returns more accurate first and
  last log sequence numbers of the log stream.

Resolves kakao#239
ijsong added a commit to ijsong/varlog that referenced this issue Nov 24, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It takes accounts for the status of log stream replicas; thus, it returns more accurate first and
  last log sequence numbers of the log stream.

Resolves kakao#239
ijsong added a commit to ijsong/varlog that referenced this issue Dec 6, 2022
This patch adds a new API called PeekLogStream to the client. The PeekLogStream returns sequence
numbers at the first and last log entries. Users using LogStreamMetadata or LogStreamReplicaMetadata
to fetch the sequence numbers should use PeekLogStream.

PeekLogStream has the benefits over the ogStreamMetadata or LogStreamReplicaMetadata.

- It does not send users useless and complex information about log stream replicas.
- It prevents users from getting too detailed information about log stream replicas.
- It takes accounts for the status of log stream replicas; thus, it returns more accurate first and
  last log sequence numbers of the log stream.

Resolves kakao#239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant