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

Reduce the usages of LOG(FATAL) or other self-descruction measures as many as possible. #5068

Closed
xtcyclist opened this issue Dec 16, 2022 · 1 comment · Fixed by #5078
Closed
Assignees
Labels
severity/major Severity of bug type/enhancement Type: make the code neat or more efficient

Comments

@xtcyclist
Copy link
Contributor

xtcyclist commented Dec 16, 2022

RT.

To improve the stability and maximize the running hours of services as much as possible.

Reasons to self-destruct:

  1. Data may be corrupted or lost, if the service continues to run.
  2. (Add more reasons here, if any)
@xtcyclist xtcyclist added type/enhancement Type: make the code neat or more efficient severity/major Severity of bug labels Dec 16, 2022
@xtcyclist
Copy link
Contributor Author

xtcyclist commented Dec 16, 2022

  StatusOr<IndexID> toTagIndexID(GraphSpaceID space, std::string tagName) override {
    UNUSED(space);
    UNUSED(tagName);
    LOG(FATAL) << "Unimplemented";
  }

  StatusOr<IndexID> toEdgeIndexID(GraphSpaceID space, std::string edgeName) override {
    UNUSED(space);
    UNUSED(edgeName);
    LOG(FATAL) << "Unimplemented";
  }

  Status checkTagIndexed(GraphSpaceID space, IndexID index) override {
    UNUSED(space);
    UNUSED(index);
    LOG(FATAL) << "Unimplemented";
  }

  Status checkEdgeIndexed(GraphSpaceID space, IndexID index) override {
    UNUSED(space);
    UNUSED(index);
    LOG(FATAL) << "Unimplemented";
  }

Cases like such shall be fixed. We should report errors on unimplemented features, not crashing the service.

@veezhang veezhang self-assigned this Dec 19, 2022
yixinglu pushed a commit to yixinglu/nebula that referenced this issue Jan 31, 2023
<!--
Thanks for your contribution!
In order to review PR more efficiently, please add information according to the template.
-->

## What type of PR is this?
- [x] bug
- [ ] feature
- [ ] enhancement

## What problem(s) does this PR solve?
#### Issue(s) number: 

fix vesoft-inc#5068

#### Description:


## How do you solve it?



## Special notes for your reviewer, ex. impact of this fix, design document, etc:



## Checklist:
Tests:
- [ ] Unit test(positive and negative cases)
- [ ] Function test
- [ ] Performance test
- [ ] N/A

Affects:
- [ ] Documentation affected (Please add the label if documentation needs to be modified.)
- [ ] Incompatibility (If it breaks the compatibility, please describe it and add the label.)
- [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
- [ ] Performance impacted: Consumes more CPU/Memory


## Release notes:

Please confirm whether to be reflected in release notes and how to describe:
> ex. Fixed the bug .....


Migrated from vesoft-inc#5078

Co-authored-by: Vee Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major Severity of bug type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants