This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new f6e3225d7 [KYUUBI #5290] Batch impl v2 should pick batch jobs in FIFO
f6e3225d7 is described below

commit f6e3225d745fa0959b65d51f49ad94db99919308
Author: zwangsheng <[email protected]>
AuthorDate: Thu Sep 14 21:59:07 2023 +0800

    [KYUUBI #5290] Batch impl v2 should pick batch jobs in FIFO
    
    ### _Why are the changes needed?_
    
    As title
    
    We should ref to FIFO design, pick oldest task to run.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run 
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
 locally before make a pull request
    
    ### _Was this patch authored or co-authored using generative AI tooling?_
    
    No
    
    Closes #5290 from zwangsheng/KYUUBI/metadata_pick_order.
    
    Closes #5290
    
    2d3b09604 [zwangsheng] [REST-V2] Should use ASC order when kyuubi server 
submitter pick task from metadata
    
    Authored-by: zwangsheng <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala
 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala
index d32cdc838..dcb9c0f66 100644
--- 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala
+++ 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala
@@ -198,7 +198,7 @@ class JDBCMetadataStore(conf: KyuubiConf) extends 
MetadataStore with Logging {
     JdbcUtils.executeQueryWithRowMapper(
       s"""SELECT identifier FROM $METADATA_TABLE
          |WHERE state=?
-         |ORDER BY create_time DESC LIMIT 1
+         |ORDER BY create_time ASC LIMIT 1
          |""".stripMargin) { stmt =>
       stmt.setString(1, OperationState.INITIALIZED.toString)
     } { resultSet =>

Reply via email to