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

Issue 3264: Return a SegmentHandle from Storage create method. #3276

Conversation

sachin-j-joshi
Copy link
Contributor

Signed-off-by: Sachin Joshi sachin.joshi@emc.com

Change log description
Segment create returns a read-write SegmentHandle . This eliminates the redundant fencing/ checks.

Purpose of the change
Fixes #3264

What the code does
All SyncStorage implementations now return read-write SegmentHandle (and avoid redundant checks/file access)

How to verify it
All unit tests and integration tests should pass.
Some improvement in performance.

Signed-off-by: Sachin Joshi <sachin.joshi@emc.com>
@codecov
Copy link

codecov bot commented Jan 12, 2019

Codecov Report

Merging #3276 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3276      +/-   ##
============================================
+ Coverage     78.85%   78.95%   +0.09%     
- Complexity     8031     8055      +24     
============================================
  Files           609      609              
  Lines         31501    31610     +109     
  Branches       3046     3085      +39     
============================================
+ Hits          24841    24957     +116     
- Misses         4865     4866       +1     
+ Partials       1795     1787       -8
Impacted Files Coverage Δ Complexity Δ
.../java/io/pravega/segmentstore/storage/Storage.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...vega/segmentstore/storage/AsyncStorageWrapper.java 93.93% <ø> (ø) 21 <0> (ø) ⬇️
.../segmentstore/server/writer/SegmentAggregator.java 78.5% <ø> (-0.03%) 237 <0> (-2)
...a/io/pravega/segmentstore/storage/SyncStorage.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...a/segmentstore/storage/rolling/RollingStorage.java 82.18% <100%> (+0.09%) 103 <0> (ø) ⬇️
...ga/segmentstore/storage/mocks/InMemoryStorage.java 89.44% <100%> (-0.06%) 26 <0> (ø)
.../server/attributes/SegmentAttributeBTreeIndex.java 91.66% <100%> (-0.04%) 68 <1> (-1)
...main/java/io/pravega/storage/hdfs/HDFSStorage.java 74.1% <100%> (+0.71%) 51 <0> (ø) ⬇️
...tstore/server/containers/StorageMetadataStore.java 81.81% <100%> (-0.95%) 22 <2> (-2)
.../pravega/storage/extendeds3/ExtendedS3Storage.java 87.57% <100%> (ø) 47 <0> (ø) ⬇️
... and 21 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 38a466a...27ef773. Read the comment docs.

…eate.

Signed-off-by: Sachin Joshi <sachin.joshi@emc.com>
@andreipaduroiu andreipaduroiu self-assigned this Jan 14, 2019
…ge.create.

Signed-off-by: Sachin Joshi <sachin.joshi@emc.com>
@andreipaduroiu andreipaduroiu merged commit 2db892c into pravega:master Jan 15, 2019
adrianmo added a commit to adrianmo/pravega that referenced this pull request Jan 23, 2019
* master: (31 commits)
  Issue 3279: Client is performing blocking operations inside Netty Event Loop (pravega#3280)
  Issue 3200: Document Review: wire-protocol.md (pravega#3201)
  Issue 2933: (SegmentStore) testEndToEndWithFencing fixes (pravega#3294)
  Issue pravega#2768: Rename PravegaCredsWrapper class and its member variable (pravega#3302)
  Issue pravega#3299: Reduce dependencies in client (pravega#3300)
  Issue 2895: Wire Protocol implementation for TableStore (pravega#3283)
  Issue-3239: Make DYNAMIC_LOGGER non-static (pravega#3293)
  Issue 2956: (SegmentStore) TableSegment.deleteIfEmpty (pravega#3263)
  Issue pravega#3289: Use compile-time dependencies where possible (pravega#3290)
  Issue 3223: RetentionTest failure (pravega#3272)
  Issue 2001: Make a defensive copy of streamCut's position map (pravega#3281)
  Issue 3287: Exclude "passwd" extensions from rat. (pravega#3288)
  Issue 3285: Changed image pull policy. (pravega#3286)
  Issue 3266: Ensure bookkeeper.bkAckQuorumSize is 3 for BookieFailover test. (pravega#3267)
  Issue 3264: Return a SegmentHandle from Storage create method. (pravega#3276)
  Issue 3086: Controller Diagrams(new) included (pravega#3097)
  Issue 2570: Update segment metrics when a transaction merge happens (pravega#3239)
  Issue 3149: (SegmentStore) Pinned Segments (pravega#3215)
  Issue 3269: Fix invalid initialization order in AbstractScaleTests. (pravega#3270)
  Issue 3148: (Segment Store) Segment Metadata Store (pravega#3206)
  ...
@sachin-j-joshi sachin-j-joshi deleted the issue-3264-storage-create-should-return-segmenthandle branch June 5, 2020 00:22
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.

None yet

2 participants