Skip to content

Conversation

@yiguolei
Copy link
Contributor

No description provided.

// if not clear rowset readers in read_params here
// readers will be release when runtime state deconstructed but
// deconstructor in reader references runtime state
// so that it will core
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment make me confusing...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means, we should deconstructor resource in close method. Not in deconstructor method.

|| read_params.reader_type == READER_QUERY) {
rs_readers = &read_params.rs_readers;
} else {
_tablet->obtain_header_rdlock();
Copy link
Contributor

Choose a reason for hiding this comment

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

can this branch be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could not. because there is another reader_type CHECK_SUM

Copy link
Contributor

Choose a reason for hiding this comment

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

Can rowsets be aquired in the same method as other types for CHECK_SUM?
Or it looks odd.

*/
// TODO(ygl): temp modify it for test !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ConfField(mutable = true, masterOnly = true)
public static long catalog_trash_expire_second = 10L; // 1day
Copy link
Contributor

Choose a reason for hiding this comment

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

you can do test by using modify configuration file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the past, it is one day。。。。

// the rowsets maybe compacted when the last olap scanner starts
_tablet->obtain_header_rdlock();
OLAPStatus acquire_reader_st = _tablet->capture_rs_readers(_params.version, &_params.rs_readers);
_tablet->release_header_lock();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should add a function in tablet who will encapsulate the lock and unlock operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently could not. because some times we do step 1 step 2 step 3 and step 3 is capture_rs_readers. If add lock in capture rs readers will be dead lock.

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.

3 participants