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

Fix some load bugs #2384

Merged
merged 11 commits into from
Dec 5, 2019
Merged

Conversation

morningman
Copy link
Contributor

For #2383

  1. Limit the concurrent transactions of routine load job
  2. Create new routine load task when txn is VISIBLE, not after COMMITTED.

For #2267

  1. All non-master daemon thread should also be started after catalog is ready.

For #2354

  1. fixLoadJobMetaError() should be called after all meta data is read, including image and edit logs.
  2. Mini load job should set to CANCELLED when corresponding transaction is not found, instead
    of UNKNOWN.

1. The concurrent running txn num of routine load job will be limited.

    Limit by FE config 'max_running_txn_num_per_db'.

2. Create new routine load task when txn is VISIBLE, not after COMMITTED.

    If publish version task has some error, there will be too many COMMITTED
    txns in GlobalTransactionMgr.
@@ -66,6 +67,10 @@

protected long timeoutMs = -1;

// this status will be set when corresponding transaction's status is changed.
// so that user or other logic can know the status of the corresponding txn.
protected TransactionStatus txnStatus = TransactionStatus.UNKNOWN;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if it is set to COMMITTED, the timeout checker will not handle this task

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if it is set to COMMITTED, the timeout checker will not handle this task

// 1. the number of running routine load tasks is limited by Config.max_routine_load_task_num_per_be
// 2. if we add routine load txn to runningTxnNums, runningTxnNums will always be occupied by routine load,
// and other txn may not be able to submitted.
if (runningRoutineLoadTxnNums.getOrDefault(dbId, 0) >= Config.max_running_txn_num_per_db) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The task will not be renew before the txn is visible at above. So we do not limit the txn in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to add the double check here, in case we meet some other unexpected bugs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe you are right, if I add this check here, may hurt some current routine load job user.
I will remove it.

@EmmyMiao87
Copy link
Contributor

For #2383, why there are always some committed but not visible txn before upgrade

@morningman
Copy link
Contributor Author

For #2383, why there are always some committed but not visible txn before upgrade

because publish task always meet error...which should be improved later..

@morningman morningman changed the title Fix some bugs Fix some load bugs Dec 5, 2019
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman closed this Dec 5, 2019
@morningman morningman reopened this Dec 5, 2019
@morningman morningman closed this Dec 5, 2019
@morningman morningman reopened this Dec 5, 2019
@morningman morningman merged commit 4f39d40 into apache:master Dec 5, 2019
morningman added a commit to morningman/doris that referenced this pull request Dec 5, 2019
For apache#2383
1. Limit the concurrent transactions of routine load job
2. Create new routine load task when txn is VISIBLE, not after COMMITTED.

For apache#2267
1. All non-master daemon thread should also be started after catalog is ready.

For apache#2354
1. `fixLoadJobMetaError()` should be called after all meta data is read, including image and edit logs.
2. Mini load job should set to CANCELLED when corresponding transaction is not found, instead
of UNKNOWN.
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.

2 participants