Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions src/iocore/cache/StripeSM.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,56 @@ struct StripeInitInfo;
class CacheEvacuateDocVC;
class RamCache;

/**
@class StripeSM

@startuml
hide empty description

[*] --> aggWrite : Constructor

note right of aggWrite
Can be called:
1. As handler (event system)
2. Directly from CacheVC::handleWrite
3. Directly from CacheSync::mainEvent
4. Directly from aggWriteDone
end note

aggWrite --> aggWriteDone

note bottom of aggWriteDone
calls aggWrite() directly
without changing state
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a pitfall. Change the state back to aggWrite before calling it seems better to me.

end note

aggWrite --> evacuateDocReadDone : evac_range()

note bottom of evacuateDocReadDone
calls aggWrite() directly
without changing state
end note

aggWrite --> handle_header_read : init(false)
aggWrite --> handle_dir_clear : init(true)

handle_header_read --> handle_dir_read
handle_header_read --> handle_dir_clear : clear_dir_aio()

handle_dir_read --> handle_recover_from_data : recover_data()
handle_dir_read --> handle_dir_clear : clear_dir_aio()

handle_recover_from_data --> handle_recover_write_dir
handle_recover_from_data --> handle_dir_clear : clear_dir_aio()

handle_recover_write_dir --> dir_init_done

handle_dir_clear --> dir_init_done

dir_init_done--> aggWrite

@enduml
*/
class StripeSM : public Continuation, public Stripe
{
public:
Expand Down