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

Segment reset API #6336

Merged
merged 5 commits into from
Dec 30, 2020
Merged

Segment reset API #6336

merged 5 commits into from
Dec 30, 2020

Conversation

npawar
Copy link
Contributor

@npawar npawar commented Dec 8, 2020

Adding a reset API. This API will disable and then enable the segment. This API will be useful in case of resetting consumers which are stuck as reported in #6308.
NOTE: Manual testing done. Writing tests pending.

  1. If the segment is in ERROR state, invoking this API will send state transitions first to OFFLINE, wait for EV to stabilize, and then back to ONLINE/CONSUMING.
  2. If segment is ONLINE/CONSUMING, invoking this API will send state transitions, first to OFFLINE, wait for EV to stabilize, and then back to ONLINE/CONSUMING.

Reset one segment:

 curl -X POST "http://localhost:9000/segments/transcript_REALTIME/transcript__1__3__20201208T1956Z/reset" -H "accept: application/json"
{"status":"Successfully reset segment: transcript__1__3__20201208T1956Z of table: transcript_REALTIME"}

Reset all segments:

curl -X POST "http://localhost:9000/segments/transcript_REALTIME/reset" -H "accept: application/json" 
{"status":"Successfully reset all segments of table: transcript_REALTIME"}

@npawar npawar requested a review from kishoreg December 8, 2020 21:38
@codecov-io
Copy link

codecov-io commented Dec 8, 2020

Codecov Report

Merging #6336 (415a6c7) into master (1beaab5) will increase coverage by 6.89%.
The diff coverage is 73.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6336      +/-   ##
==========================================
+ Coverage   66.44%   73.34%   +6.89%     
==========================================
  Files        1075     1318     +243     
  Lines       54773    64104    +9331     
  Branches     8168     9329    +1161     
==========================================
+ Hits        36396    47019   +10623     
+ Misses      15700    14032    -1668     
- Partials     2677     3053     +376     
Flag Coverage Δ
integration 44.28% <38.69%> (?)
unittests 64.99% <56.80%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ot/broker/broker/AllowAllAccessControlFactory.java 100.00% <ø> (ø)
.../helix/BrokerUserDefinedMessageHandlerFactory.java 52.83% <0.00%> (-13.84%) ⬇️
...ker/routing/instanceselector/InstanceSelector.java 100.00% <ø> (ø)
.../main/java/org/apache/pinot/client/Connection.java 44.44% <0.00%> (-4.40%) ⬇️
...not/common/assignment/InstancePartitionsUtils.java 78.57% <ø> (+5.40%) ⬆️
...common/config/tuner/NoOpTableTableConfigTuner.java 100.00% <ø> (ø)
...ot/common/config/tuner/RealTimeAutoIndexTuner.java 100.00% <ø> (ø)
.../common/config/tuner/TableConfigTunerRegistry.java 72.00% <ø> (ø)
.../apache/pinot/common/exception/QueryException.java 90.27% <ø> (+5.55%) ⬆️
...pinot/common/function/AggregationFunctionType.java 100.00% <ø> (ø)
... and 1122 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8bc74f...415a6c7. Read the comment docs.

Copy link
Member

@kishoreg kishoreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments

@npawar npawar merged commit 37f2e28 into apache:master Dec 30, 2020
@npawar npawar deleted the reset_api branch December 30, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants